]> git.lizzy.rs Git - rust.git/commitdiff
Similar to above, failed to notice that `Mode::Incremental` delegates to `run_{rpass...
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Sat, 15 Sep 2018 05:01:47 +0000 (07:01 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Fri, 21 Sep 2018 14:21:39 +0000 (16:21 +0200)
(Also, maybe we should revise the names to make it clear that sometimes "cfail" means "cpass"...)

src/tools/compiletest/src/runtest.rs

index 85ef215b5cfc10324ac36f27c9b5b56cea46857a..860a1439f6cfb5395f3bf0a71a48b9ae769ddb93 100644 (file)
@@ -274,6 +274,18 @@ fn should_compile_successfully(&self) -> bool {
             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),
         }
     }