add check for failed tests

This commit is contained in:
Stéphane Campinas 2019-04-15 12:01:49 +02:00
parent 81a1d46723
commit 31fbf34439
No known key found for this signature in database
GPG Key ID: 6D5620D908210133

View File

@ -43,7 +43,7 @@ function check_fmt_with_lib_tests {
function check_fmt_base {
local test_args="$1"
local build=$(cargo test $test_args 2>&1)
if [[ "$build" =~ "build failed" ]]; then
if [[ "$build" =~ "build failed" ]] || [[ "$build" =~ "test result: FAILED." ]]; then
return 0
fi
touch rustfmt.toml