diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-19 12:41:10 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-03-03 12:09:06 +0100 |
| commit | 00ccc7af1eb9091de7f24edf9eacb3da119d5b27 (patch) | |
| tree | be6a532808ccfd7ce4b12030b0fb7923b9500a84 | |
| parent | dee5024227b069ca787ae0f606a628bcfa94f90b (diff) | |
| download | rust-00ccc7af1eb9091de7f24edf9eacb3da119d5b27.tar.gz rust-00ccc7af1eb9091de7f24edf9eacb3da119d5b27.zip | |
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.
| -rw-r--r-- | src/test/run-pass/backtrace.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/run-pass/backtrace.rs b/src/test/run-pass/backtrace.rs index 6f76322cb77..879b3e920ab 100644 --- a/src/test/run-pass/backtrace.rs +++ b/src/test/run-pass/backtrace.rs @@ -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(); |
