Skip to content

Commit e473247

Browse files
committed
tests: crashes: more adaptations
1 parent a062f59 commit e473247

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tools/compiletest/src/header.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,8 @@ impl TestProps {
606606

607607
fn update_fail_mode(&mut self, ln: &str, config: &Config) {
608608
let check_ui = |mode: &str| {
609-
if config.mode != Mode::Ui {
609+
// Mode::Crashes may need build-fail in order to trigger llvm errors or stack overflows
610+
if config.mode != Mode::Ui && config.mode != Mode::Crashes {
610611
panic!("`{}-fail` header is only supported in UI tests", mode);
611612
}
612613
};
@@ -635,7 +636,7 @@ impl TestProps {
635636
fn update_pass_mode(&mut self, ln: &str, revision: Option<&str>, config: &Config) {
636637
let check_no_run = |s| match (config.mode, s) {
637638
(Mode::Ui, _) => (),
638-
(Mode::Crashes, "should-ice") => (),
639+
(Mode::Crashes, _) => (),
639640
(Mode::Codegen, "build-pass") => (),
640641
(Mode::Incremental, _) => {
641642
if revision.is_some() && !self.revisions.iter().all(|r| r.starts_with("cfail")) {

0 commit comments

Comments
 (0)