Skip to content

Commit 062c403

Browse files
committed
Add --regress=non-ice
Used to find when an ICE has been fixed, e.g. helpful for https://github.com/rust-lang/glacier
1 parent bf4fe84 commit 062c403

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/main.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ struct Opts {
7373
default_value = "error",
7474
help = "Custom regression definition",
7575
long_help = "Custom regression definition \
76-
[error|non-error|ice|success]"
76+
[error|non-error|ice|non-ice|success]"
7777
)]
7878
regress: String,
7979

@@ -563,6 +563,9 @@ impl Config {
563563
(OutputProcessingMode::RegressOnIceAlone, _) => {
564564
if saw_ice() { TestOutcome::Regressed } else { TestOutcome::Baseline }
565565
}
566+
(OutputProcessingMode::RegressOnNotIce, _) => {
567+
if saw_ice() { TestOutcome::Baseline } else { TestOutcome::Regressed }
568+
}
566569

567570
(OutputProcessingMode::RegressOnNonCleanError, true) => TestOutcome::Regressed,
568571
(OutputProcessingMode::RegressOnNonCleanError, false) => {
@@ -578,6 +581,7 @@ impl Config {
578581
"error" => OutputProcessingMode::RegressOnErrorStatus,
579582
"non-error" => OutputProcessingMode::RegressOnNonCleanError,
580583
"ice" => OutputProcessingMode::RegressOnIceAlone,
584+
"non-ice" => OutputProcessingMode::RegressOnNotIce,
581585
"success" => OutputProcessingMode::RegressOnSuccessStatus,
582586
setting => panic!("Unknown --regress setting: {:?}", setting),
583587
}
@@ -616,6 +620,14 @@ enum OutputProcessingMode {
616620
/// You explicitly opt into this seting via `--regress=ice`.
617621
RegressOnIceAlone,
618622

623+
/// `RegressOnNotIce`: Marks test outcome as `Regressed` if and only if
624+
/// the `rustc` process does not issue a diagnostic indicating that an
625+
/// internal compiler error (ICE) occurred. This covers the use case for
626+
/// when you want to bisect to see when an ICE was fixed.
627+
///
628+
/// You explicitly opt into this setting via `--regress=non-ice`
629+
RegressOnNotIce,
630+
619631
/// `RegressOnNonCleanError`: Marks test outcome as `Baseline` if and only
620632
/// if the `rustc` process reports error status and does not issue any
621633
/// diagnostic indicating that an internal compiler error (ICE) occurred.
@@ -639,7 +651,8 @@ impl OutputProcessingMode {
639651
OutputProcessingMode::RegressOnSuccessStatus => false,
640652

641653
OutputProcessingMode::RegressOnNonCleanError |
642-
OutputProcessingMode::RegressOnIceAlone => true,
654+
OutputProcessingMode::RegressOnIceAlone |
655+
OutputProcessingMode::RegressOnNotIce => true,
643656
}
644657
}
645658
}

0 commit comments

Comments
 (0)