Set RUST_BACKTRACE=0 when running location-detail tests

This ensures that the output does not depend on environment variables
set in the shell.
This commit is contained in:
Aaron Hill 2021-12-17 14:05:48 -05:00
parent 2595d03827
commit 2699deffbb
No known key found for this signature in database
GPG key ID: B4087E510E98B164
7 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,7 @@
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,file
// exec-env:RUST_BACKTRACE=0
fn main() {
panic!("column-redacted");

View file

@ -1,2 +1,2 @@
thread 'main' panicked at 'column-redacted', $DIR/location-detail-panic-no-column.rs:6:0
thread 'main' panicked at 'column-redacted', $DIR/location-detail-panic-no-column.rs:7:0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

View file

@ -1,6 +1,7 @@
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,column
// exec-env:RUST_BACKTRACE=0
fn main() {
panic!("file-redacted");

View file

@ -1,2 +1,2 @@
thread 'main' panicked at 'file-redacted', <redacted>:6:5
thread 'main' panicked at 'file-redacted', <redacted>:7:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

View file

@ -1,6 +1,7 @@
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=file,column
// exec-env:RUST_BACKTRACE=0
fn main() {
panic!("line-redacted");

View file

@ -1,6 +1,7 @@
// run-fail
// check-run-results
// compile-flags: -Zlocation-detail=line,column
// exec-env:RUST_BACKTRACE=0
fn main() {
let opt: Option<u32> = None;

View file

@ -1,2 +1,2 @@
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', <redacted>:7:9
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', <redacted>:8:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace