about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEd Schouten <ed@nuxi.nl>2018-01-11 17:06:33 +0100
committerEd Schouten <ed@nuxi.nl>2018-01-11 17:06:33 +0100
commit6a8d55a235e1ce6336dff162aae3feef9f7873b4 (patch)
tree16ae4e93b46e56cd4956b9c1398b8a8ad76906da /src
parentcc8565b20a89a2169b2103dcbcacb218c79dc2a4 (diff)
downloadrust-6a8d55a235e1ce6336dff162aae3feef9f7873b4.tar.gz
rust-6a8d55a235e1ce6336dff162aae3feef9f7873b4.zip
Extend tidy to allow conditionalizing tests for multiple targets.
Diffstat (limited to 'src')
-rw-r--r--src/tools/tidy/src/pal.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/tidy/src/pal.rs b/src/tools/tidy/src/pal.rs
index fdbcfd10bde..8071f07d811 100644
--- a/src/tools/tidy/src/pal.rs
+++ b/src/tools/tidy/src/pal.rs
@@ -168,8 +168,8 @@ fn find_test_mod(contents: &str) -> usize {
         let prev_newline_idx = contents[..prev_newline_idx].rfind('\n');
         if let Some(nl) = prev_newline_idx {
             let prev_line = &contents[nl + 1 .. mod_tests_idx];
-            let emcc_cfg = "cfg(all(test, not(target_os";
-            if prev_line.contains(emcc_cfg) {
+            if prev_line.contains("cfg(all(test, not(target_os")
+                || prev_line.contains("cfg(all(test, not(any(target_os") {
                 nl
             } else {
                 mod_tests_idx