diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index edab2a5ec034..eeb280e1de36 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -392,11 +392,6 @@ impl TestProps { if let Some(code) = config.parse_failure_status(ln) { self.failure_status = code; - } else { - self.failure_status = match config.mode { - Mode::RunFail => 101, - _ => 1, - }; } if !self.run_rustfix { @@ -404,6 +399,13 @@ impl TestProps { } }); + if self.failure_status == -1 { + self.failure_status = match config.mode { + Mode::RunFail => 101, + _ => 1, + }; + } + for key in &["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] { if let Ok(val) = env::var(key) { if self.exec_env.iter().find(|&&(ref x, _)| x == key).is_none() {