mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
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
This commit is contained in:
parent
7bd87c1f1b
commit
5012d205cc
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user