[LIT] Move display of unsupported and xfail tests to summary.
[oota-llvm.git] / utils / lit / lit / main.py
index 2ec14e5e5df55104f10a7603dff93dec152a9e76..7343d242cba6688c93246ac396f2a02ffbb43d64 100755 (executable)
@@ -43,8 +43,6 @@ class TestingProgressDisplay(object):
                                     test.getFullName())
 
         shouldShow = test.result.code.isFailure or \
-            (self.opts.show_unsupported and test.result.code.name == 'UNSUPPORTED') or \
-            (self.opts.show_xfail and test.result.code.name == 'XFAIL') or \
             (not self.opts.quiet and not self.opts.succinct)
         if not shouldShow:
             return
@@ -391,7 +389,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
@@ -412,7 +415,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,[]))