Skip to content

Commit

Permalink
Rollup merge of #122422 - Enselic:only-unix, r=oli-obk
Browse files Browse the repository at this point in the history
compiletest: Allow `only-unix` in test headers

The header `ignore-unix` is already allowed. Also extend tests.

This is needed by #121573 which I am splitting up into smaller and more digestible PRs.
  • Loading branch information
matthiaskrgr committed Mar 13, 2024
2 parents 3cbb932 + 8f21da1 commit fa98724
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"only-sparc64",
"only-stable",
"only-thumb",
"only-unix",
"only-wasm32",
"only-wasm32-bare",
"only-windows",
Expand Down
2 changes: 2 additions & 0 deletions src/tools/compiletest/src/header/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

Expand All @@ -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"));

Expand Down

0 comments on commit fa98724

Please sign in to comment.