diff options
Diffstat (limited to 'utils/lit/lit/main.py')
-rwxr-xr-x | utils/lit/lit/main.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/utils/lit/lit/main.py b/utils/lit/lit/main.py index 6758b6037c04..f2aedc906bb1 100755 --- a/utils/lit/lit/main.py +++ b/utils/lit/lit/main.py @@ -43,7 +43,6 @@ class TestingProgressDisplay(object): test.getFullName()) shouldShow = test.result.code.isFailure or \ - (self.opts.show_unsupported and test.result.code.name == 'UNSUPPORTED') or \ (not self.opts.quiet and not self.opts.succinct) if not shouldShow: return @@ -173,6 +172,9 @@ def main(builtinParameters = {}): group.add_option("", "--show-unsupported", dest="show_unsupported", help="Show unsupported tests", action="store_true", default=False) + group.add_option("", "--show-xfail", dest="show_xfail", + help="Show tests that were expected to fail", + action="store_true", default=False) parser.add_option_group(group) group = OptionGroup(parser, "Test Execution") @@ -390,7 +392,12 @@ def main(builtinParameters = {}): # Print each test in any of the failing groups. for title,code in (('Unexpected Passing Tests', lit.Test.XPASS), ('Failing Tests', lit.Test.FAIL), - ('Unresolved Tests', lit.Test.UNRESOLVED)): + ('Unresolved Tests', lit.Test.UNRESOLVED), + ('Unsupported Tests', lit.Test.UNSUPPORTED), + ('Expected Failing Tests', lit.Test.XFAIL)): + if (lit.Test.XFAIL == code and not opts.show_xfail) or \ + (lit.Test.UNSUPPORTED == code and not opts.show_unsupported): + continue elts = byCode.get(code) if not elts: continue @@ -411,7 +418,7 @@ def main(builtinParameters = {}): ('Unsupported Tests ', lit.Test.UNSUPPORTED), ('Unresolved Tests ', lit.Test.UNRESOLVED), ('Unexpected Passes ', lit.Test.XPASS), - ('Unexpected Failures', lit.Test.FAIL),): + ('Unexpected Failures', lit.Test.FAIL)): if opts.quiet and not code.isFailure: continue N = len(byCode.get(code,[])) @@ -437,7 +444,8 @@ def main(builtinParameters = {}): xunit_output_file.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n") xunit_output_file.write("<testsuites>\n") for suite_name, suite in by_suite.items(): - xunit_output_file.write("<testsuite name='" + suite_name + "'") + safe_suite_name = suite_name.replace(".", "-") + xunit_output_file.write("<testsuite name='" + safe_suite_name + "'") xunit_output_file.write(" tests='" + str(suite['passes'] + suite['failures']) + "'") xunit_output_file.write(" failures='" + str(suite['failures']) + |