mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
exit integration test successfully if the crate build failed before applying rustfmt
The `cargo test --all` command failed and exited the main process with a SIGINT. Trapping the signal or trying to get the code of a subshell didn't work. Close #2724
This commit is contained in:
parent
34bf13718a
commit
81a1d46723
@ -42,8 +42,8 @@ function check_fmt_with_lib_tests {
|
||||
|
||||
function check_fmt_base {
|
||||
local test_args="$1"
|
||||
cargo test $test_args
|
||||
if [[ $? != 0 ]]; then
|
||||
local build=$(cargo test $test_args 2>&1)
|
||||
if [[ "$build" =~ "build failed" ]]; then
|
||||
return 0
|
||||
fi
|
||||
touch rustfmt.toml
|
||||
|
Loading…
Reference in New Issue
Block a user