about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Nordholts <martin.nordholts@codetale.se>2024-03-11 19:26:44 +0100
committerMartin Nordholts <martin.nordholts@codetale.se>2024-03-13 06:24:33 +0100
commit8f21da1df333bdef7024266f6181ea7891bd3bea (patch)
tree424b360d113ee68caeef7d7a739412192d7d89fd
parente61dcc7a0ac33ef054d76453307124233edcf545 (diff)
downloadrust-8f21da1df333bdef7024266f6181ea7891bd3bea.tar.gz
rust-8f21da1df333bdef7024266f6181ea7891bd3bea.zip
compiletest: Allow `only-unix` in test headers
The header `ignore-unix` is already allowed. Also extend tests.
-rw-r--r--src/tools/compiletest/src/header.rs1
-rw-r--r--src/tools/compiletest/src/header/tests.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index 69658222ff3..a512599f723 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -852,6 +852,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
     "only-sparc64",
     "only-stable",
     "only-thumb",
+    "only-unix",
     "only-wasm32",
     "only-wasm32-bare",
     "only-windows",
diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs
index 433f3e8b555..cf300fbe74f 100644
--- a/src/tools/compiletest/src/header/tests.rs
+++ b/src/tools/compiletest/src/header/tests.rs
@@ -285,6 +285,7 @@ fn ignore_target() {
     assert!(check_ignore(&config, "//@ ignore-x86_64-unknown-linux-gnu"));
     assert!(check_ignore(&config, "//@ ignore-x86_64"));
     assert!(check_ignore(&config, "//@ ignore-linux"));
+    assert!(check_ignore(&config, "//@ ignore-unix"));
     assert!(check_ignore(&config, "//@ ignore-gnu"));
     assert!(check_ignore(&config, "//@ ignore-64bit"));
 
@@ -300,6 +301,7 @@ fn only_target() {
 
     assert!(check_ignore(&config, "//@ only-x86"));
     assert!(check_ignore(&config, "//@ only-linux"));
+    assert!(check_ignore(&config, "//@ only-unix"));
     assert!(check_ignore(&config, "//@ only-msvc"));
     assert!(check_ignore(&config, "//@ only-32bit"));