From: Michal Gorny Date: Wed, 6 Jun 2018 09:44:14 +0000 (+0000) Subject: [lit] Do not run Python tests w/ LLDB_DISABLE_PYTHON X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6dde83684433fa058e87dea0d7c660c9b5873b09;p=platform%2Fupstream%2Fllvm.git [lit] Do not run Python tests w/ LLDB_DISABLE_PYTHON Skip all Python-based tests as unsupported when LLDB_DISABLE_PYTHON is enabled. Otherwise, those tests simply fail being unable to import lldb module. Differential Revision: https://reviews.llvm.org/D47812 llvm-svn: 334080 --- diff --git a/lldb/lit/CMakeLists.txt b/lldb/lit/CMakeLists.txt index 899ab7ee..da429ed 100644 --- a/lldb/lit/CMakeLists.txt +++ b/lldb/lit/CMakeLists.txt @@ -46,6 +46,7 @@ endif(BUILD_SHARED_LIBS) # the value is not canonicalized within LLVM llvm_canonicalize_cmake_booleans( + LLDB_DISABLE_PYTHON LLVM_ENABLE_ZLIB) configure_lit_site_cfg( diff --git a/lldb/lit/Suite/lit.site.cfg.in b/lldb/lit/Suite/lit.site.cfg.in index 1498b2b..ab79b2b 100644 --- a/lldb/lit/Suite/lit.site.cfg.in +++ b/lldb/lit/Suite/lit.site.cfg.in @@ -13,6 +13,7 @@ config.target_triple = "@TARGET_TRIPLE@" 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 diff --git a/lldb/lit/Suite/lldbtest.py b/lldb/lit/Suite/lldbtest.py index 4c3f01b..fbdab18 100644 --- a/lldb/lit/Suite/lldbtest.py +++ b/lldb/lit/Suite/lldbtest.py @@ -37,6 +37,9 @@ class LLDBTest(TestFormat): 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')