[Lldb-commits] [PATCH] D47812: [lldb] [lit] Do not run Python tests w/ LLDB_DISABLE_PYTHON

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 6 01:47:38 PDT 2018


mgorny created this revision.
mgorny added reviewers: JDevlieghere, labath.

Skip all Python-based tests as unsupported when LLDB_DISABLE_PYTHON is
enabled.  Otherwise, those tests simply fail being unable to import lldb
module.


https://reviews.llvm.org/D47812

Files:
  lit/CMakeLists.txt
  lit/Suite/lit.site.cfg.in
  lit/Suite/lldbtest.py


Index: lit/Suite/lldbtest.py
===================================================================
--- lit/Suite/lldbtest.py
+++ lit/Suite/lldbtest.py
@@ -37,6 +37,9 @@
         if litConfig.noExecute:
             return lit.Test.PASS, ''
 
+        if test.config.lldb_disable_python:
+            return (lit.Test.UNSUPPORTED, 'Python module disabled')
+
         if test.config.unsupported:
             return (lit.Test.UNSUPPORTED, 'Test is unsupported')
 
Index: lit/Suite/lit.site.cfg.in
===================================================================
--- lit/Suite/lit.site.cfg.in
+++ lit/Suite/lit.site.cfg.in
@@ -13,6 +13,7 @@
 config.python_executable = "@PYTHON_EXECUTABLE@"
 config.dotest_path = "@LLDB_SOURCE_DIR@/test/dotest.py"
 config.dotest_args_str = "@LLDB_DOTEST_ARGS@"
+config.lldb_disable_python = @LLDB_DISABLE_PYTHON@
 
 
 # Additional dotest arguments can be passed to lit by providing a
Index: lit/CMakeLists.txt
===================================================================
--- lit/CMakeLists.txt
+++ lit/CMakeLists.txt
@@ -46,6 +46,7 @@
 
 # the value is not canonicalized within LLVM
 llvm_canonicalize_cmake_booleans(
+  LLDB_DISABLE_PYTHON
   LLVM_ENABLE_ZLIB)
 
 configure_lit_site_cfg(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47812.150088.patch
Type: text/x-patch
Size: 1229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180606/789d053d/attachment-0001.bin>


More information about the lldb-commits mailing list