Skip to content

Commit bae2bf1

Browse files
committed
Similar to above, failed to notice that Mode::Incremental delegates to run_{rpass,rfail,cfail}_test.
(Also, maybe we should revise the names to make it clear that sometimes "cfail" means "cpass"...)
1 parent a66b7d4 commit bae2bf1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,18 @@ impl<'test> TestCx<'test> {
274274
ParseFail | CompileFail => false,
275275
RunPass => true,
276276
Ui => self.props.compile_pass,
277+
Incremental => {
278+
let revision = self.revision
279+
.expect("incremental tests require a list of revisions");
280+
if revision.starts_with("rpass") || revision.starts_with("rfail") {
281+
true
282+
} else if revision.starts_with("cfail") {
283+
// FIXME: would be nice if incremental revs could start with "cpass"
284+
self.props.compile_pass
285+
} else {
286+
panic!("revision name must begin with rpass, rfail, or cfail");
287+
}
288+
}
277289
mode => panic!("unimplemented for mode {:?}", mode),
278290
}
279291
}

0 commit comments

Comments
 (0)