about summary refs log tree commit diff
path: root/tests/codegen
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/codegen
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/codegen')
-rw-r--r--tests/codegen/instrument-xray/basic.rs1
-rw-r--r--tests/codegen/instrument-xray/options-combine.rs1
-rw-r--r--tests/codegen/instrument-xray/options-override.rs1
3 files changed, 3 insertions, 0 deletions
diff --git a/tests/codegen/instrument-xray/basic.rs b/tests/codegen/instrument-xray/basic.rs
index 9c128767747..d3e49d53174 100644
--- a/tests/codegen/instrument-xray/basic.rs
+++ b/tests/codegen/instrument-xray/basic.rs
@@ -1,5 +1,6 @@
 // Checks that `-Z instrument-xray` produces expected instrumentation.
 //
+// needs-xray
 // compile-flags: -Z instrument-xray=always
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/instrument-xray/options-combine.rs b/tests/codegen/instrument-xray/options-combine.rs
index 0c1992318f5..f7e500b65f6 100644
--- a/tests/codegen/instrument-xray/options-combine.rs
+++ b/tests/codegen/instrument-xray/options-combine.rs
@@ -1,5 +1,6 @@
 // Checks that `-Z instrument-xray` options can be specified multiple times.
 //
+// needs-xray
 // compile-flags: -Z instrument-xray=skip-exit
 // compile-flags: -Z instrument-xray=instruction-threshold=123
 // compile-flags: -Z instrument-xray=instruction-threshold=456
diff --git a/tests/codegen/instrument-xray/options-override.rs b/tests/codegen/instrument-xray/options-override.rs
index 3a7c37f9006..00f81837902 100644
--- a/tests/codegen/instrument-xray/options-override.rs
+++ b/tests/codegen/instrument-xray/options-override.rs
@@ -1,5 +1,6 @@
 // Checks that the last `-Z instrument-xray` option wins.
 //
+// needs-xray
 // compile-flags: -Z instrument-xray=always
 // compile-flags: -Z instrument-xray=never