[llvm] r214609 - [lit] Add --show-xfail flag to LIT.

Eric Fiselier eric at efcs.ca
Fri Aug 1 18:29:53 PDT 2014


Author: ericwf
Date: Fri Aug  1 20:29:52 2014
New Revision: 214609

URL: http://llvm.org/viewvc/llvm-project?rev=214609&view=rev
Log:
[lit] Add --show-xfail flag to LIT.

Summary:
This patch add a --show-xfail flag. If this flag is specified then each xfail test will be printed to output.
When it is not given xfail tests are ignored. Ignoring xfail tests is the current behavior.

This flag is meant to mirror the --show-unsupported flag that was recently added.

Reviewers: ddunbar, EricWF

Reviewed By: EricWF

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D4750

Modified:
    llvm/trunk/docs/CommandGuide/lit.rst
    llvm/trunk/utils/lit/lit/main.py

Modified: llvm/trunk/docs/CommandGuide/lit.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/lit.rst?rev=214609&r1=214608&r2=214609&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/lit.rst (original)
+++ llvm/trunk/docs/CommandGuide/lit.rst Fri Aug  1 20:29:52 2014
@@ -88,6 +88,10 @@ OUTPUT OPTIONS
 
  Show the names of unsupported tests.
 
+.. option:: --show-xfail
+
+ Show the names of tests that were expected to fail.
+
 .. _execution-options:
 
 EXECUTION OPTIONS

Modified: llvm/trunk/utils/lit/lit/main.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/main.py?rev=214609&r1=214608&r2=214609&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/main.py (original)
+++ llvm/trunk/utils/lit/lit/main.py Fri Aug  1 20:29:52 2014
@@ -44,6 +44,7 @@ class TestingProgressDisplay(object):
 
         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
@@ -173,6 +174,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")





More information about the llvm-commits mailing list