Skip to content

Commit

Permalink
tests: crashes: more adaptations
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Mar 29, 2024
1 parent a062f59 commit e473247
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,8 @@ impl TestProps {

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

0 comments on commit e473247

Please sign in to comment.