Skip to content

Commit 51847e3

Browse files
QuietMisdreavuspietroalbini
authored andcommitted
compiletest: don't overwrite failure-status if it was previously set
1 parent 2cca2f5 commit 51847e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/tools/compiletest/src/header.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,13 @@ impl TestProps {
396396
}
397397
});
398398

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

0 commit comments

Comments
 (0)