Skip to content

Commit 211bc4a

Browse files
authored
Rollup merge of rust-lang#65018 - Aaron1011:fix/backtrace-stderr, r=nikomatsakis
Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr This removes the implicit dependency on the environment variables set when running `./x.py test`
2 parents 4886f35 + a336536 commit 211bc4a

8 files changed

+8
-4
lines changed

src/test/ui/proc-macro/invalid-punct-ident-1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:invalid-punct-ident.rs
2+
// rustc-env:RUST_BACKTRACE=0
23

34
// FIXME https://github.com/rust-lang/rust/issues/59998
45
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""

src/test/ui/proc-macro/invalid-punct-ident-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc macro panicked
2-
--> $DIR/invalid-punct-ident-1.rs:15:1
2+
--> $DIR/invalid-punct-ident-1.rs:16:1
33
|
44
LL | invalid_punct!();
55
| ^^^^^^^^^^^^^^^^^

src/test/ui/proc-macro/invalid-punct-ident-2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:invalid-punct-ident.rs
2+
// rustc-env:RUST_BACKTRACE=0
23

34
// FIXME https://github.com/rust-lang/rust/issues/59998
45
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""

src/test/ui/proc-macro/invalid-punct-ident-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc macro panicked
2-
--> $DIR/invalid-punct-ident-2.rs:15:1
2+
--> $DIR/invalid-punct-ident-2.rs:16:1
33
|
44
LL | invalid_ident!();
55
| ^^^^^^^^^^^^^^^^^

src/test/ui/proc-macro/invalid-punct-ident-3.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:invalid-punct-ident.rs
2+
// rustc-env:RUST_BACKTRACE=0
23

34
// FIXME https://github.com/rust-lang/rust/issues/59998
45
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""

src/test/ui/proc-macro/invalid-punct-ident-3.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: proc macro panicked
2-
--> $DIR/invalid-punct-ident-3.rs:15:1
2+
--> $DIR/invalid-punct-ident-3.rs:16:1
33
|
44
LL | invalid_raw_ident!();
55
| ^^^^^^^^^^^^^^^^^^^^^

src/test/ui/test-panic-abort.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// run-flags: --test-threads=1
44
// run-fail
55
// check-run-results
6+
// exec-env:RUST_BACKTRACE=0
67

78
// ignore-wasm no panic or subprocess support
89
// ignore-emscripten no panic or subprocess support

src/test/ui/test-panic-abort.run.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ testing123
1717
testing321
1818
thread 'main' panicked at 'assertion failed: `(left == right)`
1919
left: `2`,
20-
right: `5`', $DIR/test-panic-abort.rs:30:5
20+
right: `5`', $DIR/test-panic-abort.rs:31:5
2121
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2222

2323

0 commit comments

Comments
 (0)