[clang] 016785d - [clang/xray] Convert tests to check 'target=...'
Paul Robinson via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 21 05:19:36 PST 2022
Author: Paul Robinson
Date: 2022-12-21T05:19:27-08:00
New Revision: 016785d9316d8c5abc5fdf3cdb86479095bbb677
URL: https://github.com/llvm/llvm-project/commit/016785d9316d8c5abc5fdf3cdb86479095bbb677
DIFF: https://github.com/llvm/llvm-project/commit/016785d9316d8c5abc5fdf3cdb86479095bbb677.diff
LOG: [clang/xray] Convert tests to check 'target=...'
Part of the project to eliminate special handling for triples in lit
expressions.
Added:
Modified:
clang/test/Driver/XRay/lit.local.cfg
clang/test/Driver/XRay/xray-instrument-cpu.c
clang/test/Driver/XRay/xray-instrument-os.c
Removed:
################################################################################
diff --git a/clang/test/Driver/XRay/lit.local.cfg b/clang/test/Driver/XRay/lit.local.cfg
index 70f9792ba3db5..1755d9ab5ce9e 100644
--- a/clang/test/Driver/XRay/lit.local.cfg
+++ b/clang/test/Driver/XRay/lit.local.cfg
@@ -1,6 +1,4 @@
import platform
-target_triple_components = config.target_triple.split('-')
-config.available_features.update(target_triple_components)
# Only run the tests in platforms where XRay instrumentation is supported.
supported_targets = [
@@ -13,7 +11,7 @@ supported_oses = [
'Linux', 'FreeBSD', 'Darwin'
]
-triple_set = set(target_triple_components)
+triple_set = set(config.target_triple.split('-'))
if len(triple_set.intersection(supported_targets)) == 0:
config.unsupported = True
diff --git a/clang/test/Driver/XRay/xray-instrument-cpu.c b/clang/test/Driver/XRay/xray-instrument-cpu.c
index ee0e0984b36d8..a8bc2a6431335 100644
--- a/clang/test/Driver/XRay/xray-instrument-cpu.c
+++ b/clang/test/Driver/XRay/xray-instrument-cpu.c
@@ -1,4 +1,5 @@
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
-// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64, powerpc64le-, mips, mipsel, mips64, mips64el
+// XFAIL: target={{(amd64|x86_64|x86_64h|powerpc64le)-.*}}
+// XFAIL: target={{(arm|aarch64|arm64|mips|mipsel|mips64|mips64el)-.*}}
// REQUIRES: linux
typedef int a;
diff --git a/clang/test/Driver/XRay/xray-instrument-os.c b/clang/test/Driver/XRay/xray-instrument-os.c
index 3a0397208326f..7a4f1c13cb0b1 100644
--- a/clang/test/Driver/XRay/xray-instrument-os.c
+++ b/clang/test/Driver/XRay/xray-instrument-os.c
@@ -1,4 +1,4 @@
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
-// XFAIL: -linux-, -freebsd, x86_64-apple-darwin, x86_64-apple-macos
-// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64
+// XFAIL: target={{.*-(linux|freebsd).*}}, target=x86_64-apple-{{(darwin|macos).*}}
+// REQUIRES: target={{(amd64|x86_64|x86_64h|arm|aarch64|arm64)-.*}}
typedef int a;
More information about the cfe-commits
mailing list