about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorOleksii Lozovskyi <me@ilammy.net>2022-10-02 12:58:05 +0900
committerOleksii Lozovskyi <me@ilammy.net>2023-02-09 12:29:43 +0900
commit54b26f49e6d30aefcbf206ee5cfcf6122503553c (patch)
treec86e55fc022191bfdd526047d8860c5e06210273 /tests/ui
parent3561dc948c1a2a24c2b49992099954a96be3c8ee (diff)
downloadrust-54b26f49e6d30aefcbf206ee5cfcf6122503553c.tar.gz
rust-54b26f49e6d30aefcbf206ee5cfcf6122503553c.zip
Test XRay only for supported targets
Now that the compiler accepts "-Z instrument-xray" option only when
targeting one of the supported targets, make sure to not run the
codegen tests where the compiler will fail.

Like with other compiletests, we don't have access to internals,
so simply hardcode a list of supported architectures here.
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/instrument-xray/flags-always-never-1.rs1
-rw-r--r--tests/ui/instrument-xray/flags-always-never-2.rs1
-rw-r--r--tests/ui/instrument-xray/flags-basic.rs1
-rw-r--r--tests/ui/instrument-xray/flags-dupe-always.rs1
-rw-r--r--tests/ui/instrument-xray/flags-dupe-ignore-loops.rs1
5 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/instrument-xray/flags-always-never-1.rs b/tests/ui/instrument-xray/flags-always-never-1.rs
index 03274dedd08..4dd43439eb7 100644
--- a/tests/ui/instrument-xray/flags-always-never-1.rs
+++ b/tests/ui/instrument-xray/flags-always-never-1.rs
@@ -1,5 +1,6 @@
 // Checks that `-Z instrument-xray` does not allow `always` and `never` simultaneously.
 //
+// needs-xray
 // compile-flags: -Z instrument-xray=always,never
 // error-pattern: incorrect value `always,never` for unstable option `instrument-xray`
 
diff --git a/tests/ui/instrument-xray/flags-always-never-2.rs b/tests/ui/instrument-xray/flags-always-never-2.rs
index e752890b47a..7310aa0a0d2 100644
--- a/tests/ui/instrument-xray/flags-always-never-2.rs
+++ b/tests/ui/instrument-xray/flags-always-never-2.rs
@@ -1,6 +1,7 @@
 // Checks that `-Z instrument-xray` allows `always` and `never` sequentially.
 // (The last specified setting wins, like `-Z instrument-xray=no` as well.)
 //
+// needs-xray
 // compile-flags: -Z instrument-xray=always
 // compile-flags: -Z instrument-xray=never
 // check-pass
diff --git a/tests/ui/instrument-xray/flags-basic.rs b/tests/ui/instrument-xray/flags-basic.rs
index 5889a20f670..b97f0dd8a07 100644
--- a/tests/ui/instrument-xray/flags-basic.rs
+++ b/tests/ui/instrument-xray/flags-basic.rs
@@ -1,5 +1,6 @@
 // Verifies basic `-Z instrument-xray` flags.
 //
+// needs-xray
 // compile-flags: -Z instrument-xray
 // compile-flags: -Z instrument-xray=skip-exit
 // compile-flags: -Z instrument-xray=ignore-loops,instruction-threshold=300
diff --git a/tests/ui/instrument-xray/flags-dupe-always.rs b/tests/ui/instrument-xray/flags-dupe-always.rs
index 36dda4bbd03..407f3e2aa5d 100644
--- a/tests/ui/instrument-xray/flags-dupe-always.rs
+++ b/tests/ui/instrument-xray/flags-dupe-always.rs
@@ -1,5 +1,6 @@
 // Checks that `-Z instrument-xray` does not allow duplicates.
 //
+// needs-xray
 // compile-flags: -Z instrument-xray=always,always
 // error-pattern: incorrect value `always,always` for unstable option `instrument-xray`
 
diff --git a/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs b/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs
index 227f8557f42..75b210a6547 100644
--- a/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs
+++ b/tests/ui/instrument-xray/flags-dupe-ignore-loops.rs
@@ -1,5 +1,6 @@
 // Checks that `-Z instrument-xray` does not allow duplicates.
 //
+// needs-xray
 // compile-flags: -Z instrument-xray=ignore-loops,ignore-loops
 // error-pattern: incorrect value `ignore-loops,ignore-loops` for unstable option `instrument-xray`