From bae2bf12f6ff454724bf87234789053ceca94538 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Sat, 15 Sep 2018 07:01:47 +0200 Subject: 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"...) --- src/tools/compiletest/src/runtest.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/tools/compiletest') diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 85ef215b5cf..860a1439f6c 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -274,6 +274,18 @@ impl<'test> TestCx<'test> { ParseFail | CompileFail => false, RunPass => true, Ui => self.props.compile_pass, + Incremental => { + let revision = self.revision + .expect("incremental tests require a list of revisions"); + if revision.starts_with("rpass") || revision.starts_with("rfail") { + true + } else if revision.starts_with("cfail") { + // FIXME: would be nice if incremental revs could start with "cpass" + self.props.compile_pass + } else { + panic!("revision name must begin with rpass, rfail, or cfail"); + } + } mode => panic!("unimplemented for mode {:?}", mode), } } -- cgit 1.4.1-3-g733a5