Skip to content

Commit

Permalink
Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr
Browse files Browse the repository at this point in the history
This removes the implicit dependency on the environment variables set
when running `./x.py test`
  • Loading branch information
Aaron1011 committed Oct 2, 2019
1 parent f2023ac commit a336536
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/test/ui/proc-macro/invalid-punct-ident-1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// aux-build:invalid-punct-ident.rs
// rustc-env:RUST_BACKTRACE=0

// FIXME https://github.com/rust-lang/rust/issues/59998
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/invalid-punct-ident-1.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: proc macro panicked
--> $DIR/invalid-punct-ident-1.rs:15:1
--> $DIR/invalid-punct-ident-1.rs:16:1
|
LL | invalid_punct!();
| ^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/proc-macro/invalid-punct-ident-2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// aux-build:invalid-punct-ident.rs
// rustc-env:RUST_BACKTRACE=0

// FIXME https://github.com/rust-lang/rust/issues/59998
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/invalid-punct-ident-2.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: proc macro panicked
--> $DIR/invalid-punct-ident-2.rs:15:1
--> $DIR/invalid-punct-ident-2.rs:16:1
|
LL | invalid_ident!();
| ^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/proc-macro/invalid-punct-ident-3.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// aux-build:invalid-punct-ident.rs
// rustc-env:RUST_BACKTRACE=0

// FIXME https://github.com/rust-lang/rust/issues/59998
// normalize-stderr-test "thread.*panicked.*proc_macro_server.rs.*\n" -> ""
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/proc-macro/invalid-punct-ident-3.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: proc macro panicked
--> $DIR/invalid-punct-ident-3.rs:15:1
--> $DIR/invalid-punct-ident-3.rs:16:1
|
LL | invalid_raw_ident!();
| ^^^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/test-panic-abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// run-flags: --test-threads=1
// run-fail
// check-run-results
// exec-env:RUST_BACKTRACE=0

// ignore-wasm no panic or subprocess support
// ignore-emscripten no panic or subprocess support
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/test-panic-abort.run.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ testing123
testing321
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `2`,
right: `5`', $DIR/test-panic-abort.rs:30:5
right: `5`', $DIR/test-panic-abort.rs:31:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.


Expand Down

0 comments on commit a336536

Please sign in to comment.