From 81a1d46723121928c38fc2b7ec466c663907e4ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Campinas?= Date: Mon, 15 Apr 2019 11:33:11 +0200 Subject: [PATCH] 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 --- ci/integration.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/integration.sh b/ci/integration.sh index 6a293d5f808..f719bc5cc6e 100755 --- a/ci/integration.sh +++ b/ci/integration.sh @@ -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