Skip to content

Commit

Permalink
Rollup merge of #22970 - pnkfelix:fsk-robust-backtrace-test-against-e…
Browse files Browse the repository at this point in the history
…nv, r=alexcrichton

 Make `test/run-pass/backtrace.rs` more robust about own host environment

Namely, I have been annoyed in the past when I have done `RUST_BACKTRACE=1 make check` only to discover (again) that such a trick causes this test to fail, because it assumes that the `RUST_BACKTRACE` environment variable is not set.

Fix #22870
  • Loading branch information
Manishearth committed Mar 3, 2015
2 parents d7a44be + c6b6603 commit e7cc977
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/run-pass/backtrace.rs
Expand Up @@ -53,7 +53,9 @@ fn runtest(me: &str) {
"bad output: {}", s);

// Make sure the stack trace is *not* printed
let p = template.clone().arg("fail").spawn().unwrap();
// (Remove RUST_BACKTRACE from our own environment, in case developer
// is running `make check` with it on.)
let p = template.clone().arg("fail").env_remove("RUST_BACKTRACE").spawn().unwrap();
let out = p.wait_with_output().unwrap();
assert!(!out.status.success());
let s = str::from_utf8(&out.error).unwrap();
Expand Down

0 comments on commit e7cc977

Please sign in to comment.