From 54b26f49e6d30aefcbf206ee5cfcf6122503553c Mon Sep 17 00:00:00 2001 From: Oleksii Lozovskyi Date: Sun, 2 Oct 2022 12:58:05 +0900 Subject: 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. --- tests/codegen/instrument-xray/basic.rs | 1 + tests/codegen/instrument-xray/options-combine.rs | 1 + tests/codegen/instrument-xray/options-override.rs | 1 + 3 files changed, 3 insertions(+) (limited to 'tests/codegen') 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 -- cgit 1.4.1-3-g733a5