Skip to content

Commit 20d1c63

Browse files
committed
option to wildcard xfail-not
1 parent bfb6829 commit 20d1c63

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

llvm/utils/lit/lit/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,11 @@ def mark_xfail(selected_tests, opts):
238238
test_full_name = t.getFullName()
239239
if test_file in opts.xfail or test_full_name in opts.xfail:
240240
t.xfails += "*"
241-
if test_file in opts.xfail_not or test_full_name in opts.xfail_not:
241+
if (
242+
test_file in opts.xfail_not
243+
or test_full_name in opts.xfail_not
244+
or opts.xfail_not == ["*"]
245+
):
242246
t.xfail_not = True
243247

244248

llvm/utils/lit/tests/xfail-cl.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,21 @@
55
# RUN: %{inputs}/xfail-cl \
66
# RUN: | FileCheck --check-prefix=CHECK-FILTER %s
77

8+
# RUN: %{lit} --xfail 'false.txt;false2.txt;top-level-suite :: b :: test.txt' \
9+
# RUN: --xfail-not '*' \
10+
# RUN: %{inputs}/xfail-cl \
11+
# RUN: | FileCheck --check-prefix=CHECK-FILTER %s
12+
813
# RUN: env LIT_XFAIL='false.txt;false2.txt;top-level-suite :: b :: test.txt' \
914
# RUN: LIT_XFAIL_NOT='true-xfail.txt;top-level-suite :: a :: test-xfail.txt' \
1015
# RUN: %{lit} %{inputs}/xfail-cl \
1116
# RUN: | FileCheck --check-prefix=CHECK-FILTER %s
1217

18+
# RUN: env LIT_XFAIL='false.txt;false2.txt;top-level-suite :: b :: test.txt' \
19+
# RUN: LIT_XFAIL_NOT='*' \
20+
# RUN: %{lit} %{inputs}/xfail-cl \
21+
# RUN: | FileCheck --check-prefix=CHECK-FILTER %s
22+
1323
# Check that --xfail-not and LIT_XFAIL_NOT always have precedence.
1424

1525
# RUN: env LIT_XFAIL=true-xfail.txt \

0 commit comments

Comments
 (0)