]> git.lizzy.rs Git - rust.git/commitdiff
compiletest: Add support for ignoring certain tests under `--compare-mode=...`
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 26 Jul 2018 12:49:02 +0000 (14:49 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 26 Jul 2018 12:51:36 +0000 (14:51 +0200)
src/tools/compiletest/src/header.rs

index eeb280e1de36cbd62f54dc9c981ba78bd96c0089..e9b853722c2d3b86213c04a4d0604a229ac7ccc4 100644 (file)
@@ -14,7 +14,7 @@
 use std::io::BufReader;
 use std::path::{Path, PathBuf};
 
-use common::{self, Config, Mode};
+use common::{self, CompareMode, Config, Mode};
 use util;
 
 use extract_gdb_version;
@@ -608,7 +608,12 @@ fn parse_cfg_name_directive(&self, line: &str, prefix: &str) -> bool {
                     common::DebugInfoLldb => name == "lldb",
                     common::Pretty => name == "pretty",
                     _ => false,
-                } || (self.target != self.host && name == "cross-compile")
+                } || (self.target != self.host && name == "cross-compile") ||
+                match self.compare_mode {
+                    Some(CompareMode::Nll) => name == "compare-mode-nll",
+                    Some(CompareMode::Polonius) => name == "compare-mode-polonius",
+                    None => false,
+                }
         } else {
             false
         }