Skip to content

Commit 5852a3f

Browse files
committed
putting the failure_status code in header.rs
1 parent 9305e60 commit 5852a3f

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/tools/compiletest/src/header.rs

+3
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,9 @@ impl TestProps {
585585
_ => 1,
586586
};
587587
}
588+
if self.should_ice {
589+
self.failure_status = 101;
590+
}
588591

589592
for key in &["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
590593
if let Ok(val) = env::var(key) {

src/tools/compiletest/src/runtest.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,7 @@ impl<'test> TestCx<'test> {
434434
}
435435

436436
fn check_correct_failure_status(&self, proc_res: &ProcRes) {
437-
let expected_status =
438-
if self.props.should_ice {
439-
Some(101)
440-
} else {
441-
Some(self.props.failure_status)
442-
};
437+
let expected_status = Some(self.props.failure_status);
443438
let received_status = proc_res.status.code();
444439

445440
if expected_status != received_status {

0 commit comments

Comments
 (0)