Skip to content

Commit 2a0d334

Browse files
committed
Force RUST_BACKTRACE=0
This avoids test diffs when RUST_BACKTRACE=1 is set in in the shell config.
1 parent 0e7aa42 commit 2a0d334

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/integration.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ fn main() -> Result<()> {
3232
.envs
3333
.push(("BLESS".into(), (!args.check).then(|| String::new().into())));
3434

35+
config
36+
.program
37+
.envs
38+
.push(("RUST_BACKTRACE".into(), Some("0".into())));
39+
3540
config.stdout_filter("in ([0-9]m )?[0-9\\.]+s", "");
3641
config.stdout_filter(r#""--out-dir"(,)? "[^"]+""#, r#""--out-dir"$1 "$$TMP"#);
3742
config.filter("\\.exe", b"");

tests/integrations/basic-fail/Cargo.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ error: internal compiler error: no errors reported for args
373373

374374
thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:
375375
aborting due to `-Z treat-err-as-bug=1`
376-
stack backtrace:
376+
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
377377

378378
error: the compiler unexpectedly panicked. this is a bug.
379379

0 commit comments

Comments
 (0)