[PATCH] [llvm-lit] Add --show-unsupported flag to LIT

Eric Fiselier eric at efcs.ca
Fri Jun 27 16:30:09 PDT 2014


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

http://reviews.llvm.org/D4332

Files:
  TODO
  lit/main.py

Index: TODO
===================================================================
--- TODO
+++ TODO
@@ -156,8 +156,6 @@
 
 * Move temp directory name into local test config.
 
-* Add --show-unsupported, don't show by default?
-
 * Support valgrind in all configs, and LLVM style valgrind.
 
 * Support a timeout / ulimit.
Index: lit/main.py
===================================================================
--- lit/main.py
+++ lit/main.py
@@ -42,8 +42,10 @@
             self.progressBar.update(float(self.completed)/self.numTests,
                                     test.getFullName())
 
-        if not test.result.code.isFailure and \
-                (self.opts.quiet or self.opts.succinct):
+        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
 
         if self.progressBar:
@@ -168,6 +170,9 @@
     group.add_option("", "--no-progress-bar", dest="useProgressBar",
                      help="Do not use curses based progress bar",
                      action="store_false", default=True)
+    group.add_option("", "--show-unsupported", dest="show_unsupported",
+                     help="Show unsupported tests",
+                     action="store_true", default=False)
     parser.add_option_group(group)
 
     group = OptionGroup(parser, "Test Execution")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4332.10951.patch
Type: text/x-patch
Size: 1472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140627/ddd159a8/attachment.bin>


More information about the cfe-commits mailing list