From 5012d205ccaaf576229c5ebdf5cdfbf60af79008 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 28 Jan 2016 12:56:06 +0100 Subject: [PATCH] don't leak RUST_BACKTRACE into test process If the tests were run with `RUST_BACKTRACE=1 make check` this test failed. If they were run without it it succeeded. We need to use `env_remove` instead of `env_clear` because the latter will never work on windows --- src/test/run-pass/multi-panic.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/run-pass/multi-panic.rs b/src/test/run-pass/multi-panic.rs index 7bf07314dcc17..6a0d7278b5e16 100644 --- a/src/test/run-pass/multi-panic.rs +++ b/src/test/run-pass/multi-panic.rs @@ -17,7 +17,10 @@ fn main() { panic!(); } else { - let test = std::process::Command::new(&args[0]).arg("run_test").output().unwrap(); + let test = std::process::Command::new(&args[0]).arg("run_test") + .env_remove("RUST_BACKTRACE") + .output() + .unwrap(); assert!(!test.status.success()); let err = String::from_utf8_lossy(&test.stderr); let mut it = err.lines();