[clang/xray] Convert tests to check 'target=...'
authorPaul Robinson <paul.robinson@sony.com>
Wed, 21 Dec 2022 13:17:56 +0000 (05:17 -0800)
committerPaul Robinson <paul.robinson@sony.com>
Wed, 21 Dec 2022 13:19:27 +0000 (05:19 -0800)
Part of the project to eliminate special handling for triples in lit
expressions.

clang/test/Driver/XRay/lit.local.cfg
clang/test/Driver/XRay/xray-instrument-cpu.c
clang/test/Driver/XRay/xray-instrument-os.c

index 70f9792..1755d9a 100644 (file)
@@ -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
 
index ee0e098..a8bc2a6 100644 (file)
@@ -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;
index 3a03972..7a4f1c1 100644 (file)
@@ -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;