[PATCH] D45215: RFC/WIP: Have lit run the lldb test suite

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 10:53:13 PDT 2018


JDevlieghere updated this revision to Diff 140826.
JDevlieghere added a comment.

- Add few more examples as per Davide's request.
- Add run line to the python file.

Because the `.py` suffix is currently specified in the root of the `TestSuite` directory, we end up with a bunch of unresolved tests. One alternative is having a local config in each subdirectory, but that kind of defeats the point of moving the run line into the python files. Either way we'll have to come up with some kind of solution, because not all `.py` files are test cases. LMKWYT!


https://reviews.llvm.org/D45215

Files:
  lit/TestSuite
  packages/Python/lldbsuite/test/lit.local.cfg
  packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
  packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
  packages/Python/lldbsuite/test/types/TestFloatTypes.py
  packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py


Index: packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py
===================================================================
--- packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py
+++ packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py
@@ -1,4 +1,8 @@
-"""Test that the 'add-dsym', aka 'target symbols add', command informs the user about success or failure."""
+"""
+Test that the 'add-dsym', aka 'target symbols add', command informs the user about success or failure.
+
+RUN: lldb-dotest %S -p AddDsymCommand
+"""
 
 from __future__ import print_function
 
Index: packages/Python/lldbsuite/test/types/TestFloatTypes.py
===================================================================
--- packages/Python/lldbsuite/test/types/TestFloatTypes.py
+++ packages/Python/lldbsuite/test/types/TestFloatTypes.py
@@ -1,5 +1,7 @@
 """
 Test that variables of floating point types are displayed correctly.
+
+RUN: lldb-dotest %S -p TestFloatTypes
 """
 
 from __future__ import print_function
Index: packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
===================================================================
--- packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
+++ packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
@@ -1,5 +1,7 @@
 """
 Test that 'stty -a' displays the same output before and after running the lldb command.
+
+RUN: lldb-dotest %S -p TestSTTYBeforeAndAfter
 """
 
 from __future__ import print_function
Index: packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
===================================================================
--- packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
+++ packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
@@ -7,6 +7,8 @@
   Test display of source using the SBSourceManager API.
 o test_modify_source_file_while_debugging:
   Test the caching mechanism of the source manager.
+
+RUN: lldb-dotest %S -p TestSourceManager
 """
 
 from __future__ import print_function
Index: packages/Python/lldbsuite/test/lit.local.cfg
===================================================================
--- /dev/null
+++ packages/Python/lldbsuite/test/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.py']
Index: lit/TestSuite
===================================================================
--- /dev/null
+++ lit/TestSuite
@@ -0,0 +1 @@
+../packages/Python/lldbsuite/test/
\ No newline at end of file


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45215.140826.patch
Type: text/x-patch
Size: 2487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180403/b4bf674c/attachment.bin>


More information about the llvm-commits mailing list