Skip to content

Commit

Permalink
compiletest: make the crash test error message abit more informative
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jun 16, 2024
1 parent 55cac26 commit d7a533c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,12 @@ impl<'test> TestCx<'test> {

// if a test does not crash, consider it an error
if proc_res.status.success() || matches!(proc_res.status.code(), Some(1 | 0)) {
self.fatal(
"test no longer crashes/triggers ICE! Please give it a mearningful name, \
self.fatal(&format!(
"Crashtest no longer crashes/triggers ICE, horray! Please give it a meaningful name, \
add a doc-comment to the start of the test explaining why it exists and \
move it to tests/ui or wherever you see fit.",
);
move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR body \
ensures that the corresponding ticket is auto-closed upon merge."
));
}
}

Expand Down

0 comments on commit d7a533c

Please sign in to comment.