Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: relax panic output assertion #14602

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/testsuite/freshness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,7 @@ test t1 ... FAILED
failures:

---- t1 stdout ----
...
thread 't1' panicked at src/lib.rs:8:21:
assertion `left == right` failed: doit assert failure
left: 2
Expand Down Expand Up @@ -1958,6 +1959,7 @@ Caused by:
cargo::rerun-if-changed=build.rs

--- stderr
...
thread 'main' panicked at helper.rs:1:16:
Crash!
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expand All @@ -1977,6 +1979,7 @@ Caused by:
cargo::rerun-if-changed=build.rs

--- stderr
...
thread 'main' panicked at helper.rs:1:16:
Crash!
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expand Down
1 change: 1 addition & 0 deletions tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,7 @@ fn reports_unsuccessful_subcommand_result() {
cargo_process("fail")
.with_status(101)
.with_stderr_data(str![[r#"
...
thread 'main' panicked at [ROOT]/home/.cargo/registry/src/-[HASH]/cargo-fail-1.0.0/src/main.rs:1:13:
explicit panic
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expand Down
6 changes: 6 additions & 0 deletions tests/testsuite/jobserver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ this is a runner
.with_stderr_data(str![[r#"
[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
Expand All @@ -248,9 +249,11 @@ no jobserver from env: NotPresent
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
[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
Expand All @@ -268,6 +271,7 @@ 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
Expand All @@ -290,6 +294,7 @@ test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out;
[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
[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
Expand All @@ -304,6 +309,7 @@ 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
Expand Down
1 change: 1 addition & 0 deletions tests/testsuite/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ test test_hello ... FAILED
failures:

---- test_hello stdout ----
...
thread 'test_hello' panicked at src/lib.rs:1:27:
assertion failed: false
...
Expand Down