Skip to content

Commit e3bc713

Browse files
compiletest: don't overwrite failure-status if it was previously set
1 parent d3569d2 commit e3bc713

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/tools/compiletest/src/header.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -392,18 +392,20 @@ impl TestProps {
392392

393393
if let Some(code) = config.parse_failure_status(ln) {
394394
self.failure_status = code;
395-
} else {
396-
self.failure_status = match config.mode {
397-
Mode::RunFail => 101,
398-
_ => 1,
399-
};
400395
}
401396

402397
if !self.run_rustfix {
403398
self.run_rustfix = config.parse_run_rustfix(ln);
404399
}
405400
});
406401

402+
if self.failure_status == -1 {
403+
self.failure_status = match config.mode {
404+
Mode::RunFail => 101,
405+
_ => 1,
406+
};
407+
}
408+
407409
for key in &["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
408410
if let Ok(val) = env::var(key) {
409411
if self.exec_env.iter().find(|&&(ref x, _)| x == key).is_none() {

0 commit comments

Comments
 (0)