Skip to content

Commit 43e3fa9

Browse files
committed
Auto merge of #14602 - weihanglo:rust-122565, r=epage
test: relax panic output assertion ### What does this PR try to resolve? rust-lang/rust#122565 adds a new line to thread panic output. To make the current test suites works on stable, beta, and nightly, this relaxes the assertion around that by globbing everything. ### How should we test and review this PR? Switch to rust-lang/rust#122565 and build a stage0 std, then use it to run these Cargo tests. Linking to stage0 toolchain should work: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#creating-a-rustup-toolchain
2 parents 9d66d13 + 498ae39 commit 43e3fa9

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

tests/testsuite/freshness.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,6 +1891,7 @@ test t1 ... FAILED
18911891
failures:
18921892
18931893
---- t1 stdout ----
1894+
...
18941895
thread 't1' panicked at src/lib.rs:8:21:
18951896
assertion `left == right` failed: doit assert failure
18961897
left: 2
@@ -1958,6 +1959,7 @@ Caused by:
19581959
cargo::rerun-if-changed=build.rs
19591960
19601961
--- stderr
1962+
...
19611963
thread 'main' panicked at helper.rs:1:16:
19621964
Crash!
19631965
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@@ -1977,6 +1979,7 @@ Caused by:
19771979
cargo::rerun-if-changed=build.rs
19781980
19791981
--- stderr
1982+
...
19801983
thread 'main' panicked at helper.rs:1:16:
19811984
Crash!
19821985
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/testsuite/install.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,7 @@ fn reports_unsuccessful_subcommand_result() {
13271327
cargo_process("fail")
13281328
.with_status(101)
13291329
.with_stderr_data(str![[r#"
1330+
...
13301331
thread 'main' panicked at [ROOT]/home/.cargo/registry/src/-[HASH]/cargo-fail-1.0.0/src/main.rs:1:13:
13311332
explicit panic
13321333
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/testsuite/jobserver.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ this is a runner
232232
.with_stderr_data(str![[r#"
233233
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
234234
[RUNNING] `target/debug/cargo-jobserver-check[EXE]`
235+
...
235236
thread 'main' panicked at src/main.rs:5:43:
236237
no jobserver from env: NotPresent
237238
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@@ -248,9 +249,11 @@ no jobserver from env: NotPresent
248249
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
249250
[RUNNING] `runner target/debug/cargo-jobserver-check[EXE]`
250251
this is a runner
252+
...
251253
thread 'main' panicked at src/main.rs:5:43:
252254
no jobserver from env: NotPresent
253255
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
256+
...
254257
thread 'main' panicked at src/main.rs:6:17:
255258
assertion failed: status.success()
256259
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@@ -268,6 +271,7 @@ test test ... FAILED
268271
failures:
269272
270273
---- test stdout ----
274+
...
271275
thread 'test' panicked at src/lib.rs:4:42:
272276
no jobserver from env: NotPresent
273277
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@@ -290,6 +294,7 @@ test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out;
290294
[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
291295
[RUNNING] unittests src/lib.rs (target/debug/deps/cargo_jobserver_check-[HASH][EXE])
292296
this is a runner
297+
...
293298
thread 'main' panicked at src/main.rs:6:17:
294299
assertion failed: status.success()
295300
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@@ -304,6 +309,7 @@ test test ... FAILED
304309
failures:
305310
306311
---- test stdout ----
312+
...
307313
thread 'test' panicked at src/lib.rs:4:42:
308314
no jobserver from env: NotPresent
309315
[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace

tests/testsuite/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ test test_hello ... FAILED
516516
failures:
517517
518518
---- test_hello stdout ----
519+
...
519520
thread 'test_hello' panicked at src/lib.rs:1:27:
520521
assertion failed: false
521522
...

0 commit comments

Comments
 (0)