bors [Mon, 9 Jan 2017 04:20:40 +0000 (04:20 +0000)]
Auto merge of #3510 - froydnj:cross-compilation-test-checking, r=alexcrichton
handle cross-compilation test failure more gracefully
The current cross-compilation test module fails every test if an appropriate cross standard library is not found. This behavior is unhelpful, because the failures are verbose, unexpected, and there's no
obvious way to make them go away.
Instead, it would be better to check once before all the tests that an appropriate cross-compilation setup is available. Once that check has been done, a single test can fail with an appropriate `panic!` message while the other tests silently pass. The `panic!` message can inform the user about their options, either setting an appropriate environment variable, or using rustup to install the necessary cross standard library.
Assuming the user has rustup installed, the single failure now looks
something like:
```
thread 'plugin_deps' panicked at 'Cannot cross compile to i686-unknown-linux-gnu.
This failure can be safely ignored. If you would prefer to not see this
failure, you can set the environment variable CFG_DISABLE_CROSS_TESTS to "1".
Alternatively, you can install the necessary libraries for cross-compilation with
rustup toolchain install stable-i686-unknown-linux-gnu
', tests/cross-compile.rs:87
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```
The code is admittedly gnarly, with synchronization and `unsafe` sections, but I wasn't sure how to make it any better. Suggestions welcome!
Nathan Froyd [Fri, 6 Jan 2017 19:30:38 +0000 (14:30 -0500)]
handle cross-compilation test failure more gracefully
The current cross-compilation test module fails every test if an
appropriate cross standard library is not found. This behavior is
unhelpful, because the failures are verbose, unexpected, and there's no
obvious way to make them go away.
Instead, it would be better to check once before all the tests that an
appropriate cross-compilation setup is available. Once that check has
been done, a single test can fail with an appropriate `panic!` message
while the other tests silently pass. The `panic!` message can inform
the user about their options, either setting an appropriate environment
variable, or using rustup to install the necessary cross standard
library.
Assuming the user has rustup installed, the single failure now looks
something like:
```
thread 'plugin_deps' panicked at 'Cannot cross compile to i686-unknown-linux-gnu.
This failure can be safely ignored. If you would prefer to not see this
failure, you can set the environment variable CFG_DISABLE_CROSS_TESTS to "1".
Alternatively, you can install the necessary libraries for cross-compilation with
You may need to install runtime libraries for your Linux distribution as well.
', tests/cross-compile.rs:87
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```
bors [Fri, 6 Jan 2017 20:57:04 +0000 (20:57 +0000)]
Auto merge of #3509 - froydnj:colored-shell-tests, r=alexcrichton
disable color shell tests for terminals that don't support color
Some terminals (e.g. running a shell inside Emacs's shell-mode) don't
support color, and running tests that assume the terminal supports color
don't work so well. Instead, if color is expected, check the terminal
for whether it supports color or not, and act accordingly.
Nathan Froyd [Fri, 6 Jan 2017 17:46:56 +0000 (12:46 -0500)]
disable color shell tests for terminals that don't support color
Some terminals (e.g. running a shell inside Emacs's shell-mode) don't
support color, and running tests that assume the terminal supports color
don't work so well. Instead, if color is expected, check the terminal
for whether it supports color or not, and act accordingly.
bors [Fri, 6 Jan 2017 06:15:35 +0000 (06:15 +0000)]
Auto merge of #3427 - nrc:api-check-2, r=alexcrichton
Make some aspects of check/build available as an API.
There are two key parts to this commit:
* let API clients run `cargo check` with minimal fuss (ops/cargo_check.rs),
* let API clients intercept and customise Cargo's calls to rustc (all the Executor stuff).
Nick Cameron [Thu, 29 Dec 2016 23:19:34 +0000 (12:19 +1300)]
review changes, round 2 part b
Remove the ContinueBuild concept, be lenient about missing files in all cases, and undo the fingerprint changes (not an issue now we're not stopping the build early).
Nick Cameron [Tue, 6 Dec 2016 03:15:46 +0000 (17:15 -1000)]
Make some aspects of check/build available as an API.
There are two key parts to this commit:
* let API clients run `cargo check` with minimal fuss (ops/cargo_check.rs),
* let API clients intercept and customise Cargo's calls to rustc (all the Executor stuff).
bors [Sat, 31 Dec 2016 02:48:35 +0000 (02:48 +0000)]
Auto merge of #3480 - alexcrichton:one-flaky-test, r=brson
Protect against spurious failure in ctrl_c test
A failure was witnessed in the Rust repository [1] which happened right after
this test and was a problem removing a directory. Local testing confirms that if
you kill Cargo then right afterwards it's very unlikely to be able to remove the
build directory, presumably because the child process is still getting torn down
in the background.
This commit fixes the ctrl_c test itself to wait for itself to release the bulid
directory, at which point the test has definitely passed.
Alex Crichton [Sat, 31 Dec 2016 02:40:20 +0000 (18:40 -0800)]
Protect against spurious failure in ctrl_c test
A failure was witnessed in the Rust repository [1] which happened right after
this test and was a problem removing a directory. Local testing confirms that if
you kill Cargo then right afterwards it's very unlikely to be able to remove the
build directory, presumably because the child process is still getting torn down
in the background.
This commit fixes the ctrl_c test itself to wait for itself to release the bulid
directory, at which point the test has definitely passed.
bors [Thu, 29 Dec 2016 20:38:27 +0000 (20:38 +0000)]
Auto merge of #3470 - alexcrichton:no-more-urls, r=steveklabnik
Delete manual installation URLs
These have existed since the beginning of time, but they haven't needed to exist
since long before 1.0. Let's just delete them now that they're out of date
anyway.
Alex Crichton [Thu, 29 Dec 2016 16:06:38 +0000 (08:06 -0800)]
Delete manual installation URLs
These have existed since the beginning of time, but they haven't needed to exist
since long before 1.0. Let's just delete them now that they're out of date
anyway.
bors [Mon, 19 Dec 2016 17:04:04 +0000 (17:04 +0000)]
Auto merge of #3410 - fmdkdd:fix-3390-message-format-parse-stderr, r=alexcrichton
Fix `--message-format JSON` when rustc emits non-JSON warnings
The `--message-format JSON` flag parses all the stderr output of rustc to JSON,
but rustc can emit non-JSON lines to stderr (e.g., for warning about the
unstable `-Z` flag on the stable channel), causing cargo to fail reporting
compilation errors when using `--message-format JSON`.
This commit adds a check to look for lines beginning with `{` to only parse
these lines as JSON. Other lines from rustc are forwarded to the stderr of
cargo.
fmdkdd [Thu, 15 Dec 2016 23:05:58 +0000 (00:05 +0100)]
Fix `--message-format JSON` when rustc emits non-JSON warnings
The `--message-format JSON` flag parses all the stderr output of rustc to JSON,
but rustc can emit non-JSON lines to stderr (e.g., for warning about the
unstable `-Z` flag on the stable channel), causing cargo to fail reporting
compilation errors when using `--message-format JSON`.
This commit adds a check to look for lines beginning with `{` to only parse
these lines as JSON. Other lines from rustc are forwarded to the stderr of
cargo.
bors [Thu, 15 Dec 2016 03:04:20 +0000 (03:04 +0000)]
Auto merge of #3393 - alexcrichton:fix-libz-linkage, r=brson
Bump libz-sys to 1.0.9
This just switches libz to always link statically instead of relying on the
system zlib. For MinGW it seems that linkage may default pull in a DLL, which is
almost never what we want.
Alex Crichton [Tue, 13 Dec 2016 08:22:00 +0000 (00:22 -0800)]
Bump libz-sys to 1.0.9
This just switches libz to always link statically instead of relying on the
system zlib. For MinGW it seems that linkage may default pull in a DLL, which is
almost never what we want.
Also update curl-sys to fix a build issue on MinGW.