From: Paul Robinson Date: Wed, 21 Dec 2022 13:17:56 +0000 (-0800) Subject: [clang/xray] Convert tests to check 'target=...' X-Git-Tag: upstream/17.0.6~22981 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=016785d9316d8c5abc5fdf3cdb86479095bbb677;p=platform%2Fupstream%2Fllvm.git [clang/xray] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. --- diff --git a/clang/test/Driver/XRay/lit.local.cfg b/clang/test/Driver/XRay/lit.local.cfg index 70f9792..1755d9a 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 ee0e098..a8bc2a6 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 3a03972..7a4f1c1 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;