Index: lldb/test/API/lldbtest.py =================================================================== --- lldb/test/API/lldbtest.py +++ lldb/test/API/lldbtest.py @@ -95,8 +95,12 @@ # Otherwise this is just a failure. return lit.Test.FAIL, output - has_unsupported_tests = 'UNSUPPORTED:' in out or 'UNSUPPORTED:' in err has_passing_tests = 'PASS:' in out or 'PASS:' in err + has_expected_failures = 'XFAIL:' in out or 'XFAIL:' in err + if has_expected_failures and not has_passing_tests: + return lit.Test.XFAIL, output + + has_unsupported_tests = 'UNSUPPORTED:' in out or 'UNSUPPORTED:' in err if has_unsupported_tests and not has_passing_tests: return lit.Test.UNSUPPORTED, output