[llvm] [lit] Support wildcard in --xfail-not option (PR #151191)
Joel E. Denny via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 09:13:41 PDT 2025
================
@@ -2175,6 +2175,8 @@ def parseIntegratedTestScript(test, additional_parsers=[], require_script=True):
assert parsed["DEFINE:"] == script
assert parsed["REDEFINE:"] == script
test.xfails += parsed["XFAIL:"] or []
+ if test.xfails and test.skip_xfail:
+ return lit.Test.Result(Test.SKIPPED, "skipping XFAIL tests")
----------------
jdenny-ornl wrote:
For consistency with other usage, it seems like the result code ought to be `Test.EXCLUDED`, which seems to be used for cases when the user has excluded tests up front. `Test.SKIPPED` seems to be used for cases when a particular run didn't manage to reach a test even though it was not excluded by the user up front. For example, in `llvm/utils/lit/lit/reports.py`, see `XunitReport._get_skip_reason`, which has:
```
if code == lit.Test.EXCLUDED:
return "Test not selected (--filter, --max-tests)"
if code == lit.Test.SKIPPED:
return "User interrupt"
```
Maybe we should also rename the option to `--exclude-xfail` for consistency? Sorry for not thinking of this before I proposed `--skip-xfail`. I had not thought about result codes yet.
https://github.com/llvm/llvm-project/pull/151191
More information about the llvm-commits
mailing list