Skip to content

Commit

Permalink
check for sould-ice either in compilefail or incremental cfail
Browse files Browse the repository at this point in the history
traxys committed Nov 8, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5852a3f commit e01d941
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
@@ -298,6 +298,12 @@ impl<'test> TestCx<'test> {
/// Code executed for each revision in turn (or, if there are no
/// revisions, exactly once, with revision == None).
fn run_revision(&self) {
if self.props.should_ice {
if self.config.mode != CompileFail &&
self.config.mode != Incremental {
self.fatal("cannot use should-ice in a test that is not cfail");
}
}
match self.config.mode {
CompileFail => self.run_cfail_test(),
RunFail => self.run_rfail_test(),
@@ -2782,8 +2788,14 @@ impl<'test> TestCx<'test> {
}

if revision.starts_with("rpass") {
if revision_cx.props.should_ice {
revision_cx.fatal("can only use should-ice in cfail tests");
}
revision_cx.run_rpass_test();
} else if revision.starts_with("rfail") {
if revision_cx.props.should_ice {
revision_cx.fatal("can only use should-ice in cfail tests");
}
revision_cx.run_rfail_test();
} else if revision.starts_with("cfail") {
revision_cx.run_cfail_test();

0 comments on commit e01d941

Please sign in to comment.