summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-09-15 07:01:47 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-09-21 16:21:39 +0200
commitbae2bf12f6ff454724bf87234789053ceca94538 (patch)
treea3961b3ae241a1ecb0cb0066e26b79218fc551cb /src/tools/compiletest
parenta66b7d4e9da5273b12bb610e05dbf2bb190f431e (diff)
downloadrust-bae2bf12f6ff454724bf87234789053ceca94538.tar.gz
rust-bae2bf12f6ff454724bf87234789053ceca94538.zip
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"...)
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/runtest.rs12
1 files changed, 12 insertions, 0 deletions
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),
         }
     }