Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 81a1d46

Browse files
committed
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 rust-lang#2724
1 parent 34bf137 commit 81a1d46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ci/integration.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ function check_fmt_with_lib_tests {
4242

4343
function check_fmt_base {
4444
local test_args="$1"
45-
cargo test $test_args
46-
if [[ $? != 0 ]]; then
45+
local build=$(cargo test $test_args 2>&1)
46+
if [[ "$build" =~ "build failed" ]]; then
4747
return 0
4848
fi
4949
touch rustfmt.toml

0 commit comments

Comments
 (0)