[Lldb-commits] [PATCH] D85169: [test] Exit with an error if no tests are run.

Jordan Rupprecht via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 3 16:16:45 PDT 2020


rupprecht updated this revision to Diff 282759.
rupprecht added a comment.

- Use logging.error
- Remove trailing stop
- Edit message to indicate that matching tests weren't found (user error)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85169/new/

https://reviews.llvm.org/D85169

Files:
  lldb/packages/Python/lldbsuite/test/dotest.py


Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -1039,6 +1039,10 @@
             (configuration.suite.countTestCases(),
              configuration.suite.countTestCases() != 1 and "s" or ""))
 
+    if configuration.suite.countTestCases() == 0:
+        logging.error("did not discover any matching tests")
+        exitTestSuite(1)
+
     # Invoke the test runner.
     if configuration.count == 1:
         result = unittest2.TextTestRunner(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85169.282759.patch
Type: text/x-patch
Size: 620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200803/5402f5a0/attachment.bin>


More information about the lldb-commits mailing list