test(jobserver): relax compiler panic assertions

This commit is contained in:
Weihang Lo
2024-09-27 20:38:18 -04:00
parent e4e970d309
commit b1f574a10d

View File

@@ -233,9 +233,7 @@ this is a runner
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
[RUNNING] `target/debug/cargo-jobserver-check[EXE]`
...
thread 'main' panicked at src/main.rs:5:43:
no jobserver from env: NotPresent
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[..]no jobserver from env[..]
...
"#]])
@@ -250,40 +248,14 @@ no jobserver from env: NotPresent
[RUNNING] `runner target/debug/cargo-jobserver-check[EXE]`
this is a runner
...
thread 'main' panicked at src/main.rs:5:43:
no jobserver from env: NotPresent
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
...
thread 'main' panicked at src/main.rs:6:17:
assertion failed: status.success()
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[..]no jobserver from env[..]
...
"#]])
.run();
p.cargo("test -j2")
.with_status(101)
.with_stdout_data(str![[r#"
running 1 test
test test ... FAILED
failures:
---- test stdout ----
...
thread 'test' panicked at src/lib.rs:4:42:
no jobserver from env: NotPresent
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
test
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in [ELAPSED]s
"#]])
.with_stdout_data("...\n[..]no jobserver from env[..]\n...")
.run();
p.cargo("test -j2")
.env("PATH", path)
@@ -295,33 +267,9 @@ test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out;
[RUNNING] unittests src/lib.rs (target/debug/deps/cargo_jobserver_check-[HASH][EXE])
this is a runner
...
thread 'main' panicked at src/main.rs:6:17:
assertion failed: status.success()
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ERROR] test failed, to rerun pass `--lib`
"#]])
.with_stdout_data(str![[r#"
running 1 test
test test ... FAILED
failures:
---- test stdout ----
...
thread 'test' panicked at src/lib.rs:4:42:
no jobserver from env: NotPresent
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
test
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in [ELAPSED]s
"#]])
.with_stdout_data("...\n[..]no jobserver from env[..]\n...")
.run();
}