Skip to content

Commit

Permalink
exit integration test successfully if the crate build failed before a…
Browse files Browse the repository at this point in the history
…pplying 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 rust-lang#2724
  • Loading branch information
scampi committed Apr 15, 2019
1 parent 34bf137 commit 81a1d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81a1d46

Please # to comment.