Skip to content

Commit dc69eae

Browse files
authored
[llvm-ar] Fix darwin-related tests' XFAIL annotation (#130144)
The tests updated by this commit are expected to fail when targetting a darwin platform. As they rely on target detection based on the host, this is currently checked by using the `XFAIL: system-darwin` annotation. This approach becomes a problem when trying to run such tests on a cross-compiling build of clang on a darwin platform. When no darwin targets are included in the build, the XFAIL will still apply even though the target used is not related to the darwin platform, and the tests will unexpectedly pass. To fix this issue, this patch updates the condition used by the tests' XFAIL annotation to `target={{.*}}-darwin{{.*}}`, ensuring they only are xfailed when the relevant target is used.
1 parent 5239f67 commit dc69eae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/test/tools/llvm-ar/extract.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Test extract operation.
2-
# XFAIL: system-darwin
2+
# XFAIL: target={{.*}}-darwin{{.*}}
33

44
# RUN: rm -rf %t && mkdir -p %t/extracted/
55

llvm/test/tools/llvm-ar/print.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Test Print output
2-
# XFAIL: system-darwin
2+
# XFAIL: target={{.*}}-darwin{{.*}}
33

44
# RUN: rm -rf %t && mkdir -p %t
55
# RUN: echo file1 > %t/1.txt

0 commit comments

Comments
 (0)