diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs index 6a062cfb60ff..455246b852b1 100644 --- a/tests/testsuite/test.rs +++ b/tests/testsuite/test.rs @@ -4792,6 +4792,20 @@ error: test failed, to rerun pass `--test t1` [RUNNING] tests/t2.rs (target/debug/deps/t2[..]) error: test failed, to rerun pass `--test t2` +Caused by: + process didn't exit successfully: `[ROOT]/foo/target/debug/deps/t2[..]` (exit [..]: 4) +", + ) + .with_status(4) + .run(); + + p.cargo("test --test t2 -- --nocapture") + .with_stderr( + "\ +[FINISHED] test [..] +[RUNNING] tests/t2.rs (target/debug/deps/t2[..]) +error: test failed, to rerun pass `--test t2` + Caused by: process didn't exit successfully: `[ROOT]/foo/target/debug/deps/t2[..]` (exit [..]: 4) ", @@ -4809,6 +4823,27 @@ error: test failed, to rerun pass `--test t1` [RUNNING] tests/t2.rs (target/debug/deps/t2[..]) error: test failed, to rerun pass `--test t2` +Caused by: + process didn't exit successfully: `[ROOT]/foo/target/debug/deps/t2[..]` (exit [..]: 4) +error: 2 targets failed: + `--test t1` + `--test t2` +", + ) + .with_status(101) + .run(); + + p.cargo("test --no-fail-fast -- --nocapture") + .with_stderr( + "\ +[FINISHED] test [..] +[RUNNING] tests/t1.rs (target/debug/deps/t1[..]) +thread 't' panicked at 'this is a normal error', tests/t1[..] +note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +error: test failed, to rerun pass `--test t1` +[RUNNING] tests/t2.rs (target/debug/deps/t2[..]) +error: test failed, to rerun pass `--test t2` + Caused by: process didn't exit successfully: `[ROOT]/foo/target/debug/deps/t2[..]` (exit [..]: 4) error: 2 targets failed: