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:
Stéphane Campinas 2019-04-15 11:33:11 +02:00
parent 34bf13718a
commit 81a1d46723
No known key found for this signature in database
GPG Key ID: 6D5620D908210133

View File

@ -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