Skip to content

Commit 81f68a7

Browse files
author
kendal
committed
[lldb][test] Mark gtest cases as XFAIL if the test is XFAIL
When a test case inside of a gtest suite fails, we report a failure which causes the entire `ninja check-lldb` invocation to fail, even if the outer test case is marked as XFAIL. This change checks whether each test case's parent test suite is XFAIL before setting the status to FAIL.
1 parent 0889809 commit 81f68a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/lit/lit/formats/googletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def remove_gtest(tests):
334334
returnCode = lit.Test.SKIPPED
335335
elif "failures" in testinfo:
336336
has_failure_in_shard = True
337-
returnCode = lit.Test.FAIL
337+
returnCode = lit.Test.XFAIL if test.isExpectedToFail() else lit.Test.FAIL
338338
output = header
339339
for fail in testinfo["failures"]:
340340
output += fail["failure"] + "\n"

0 commit comments

Comments
 (0)