diff --git a/ci/integration.sh b/ci/integration.sh index 6a293d5f80838..f719bc5cc6e4d 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