diff --git a/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt --- a/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt +++ b/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt @@ -1,8 +1,11 @@ +set(LLDB_HAS_SCRIPT_INTERPRETER FALSE) add_subdirectory(None) if (LLDB_ENABLE_PYTHON) + set(LLDB_HAS_SCRIPT_INTERPRETER TRUE) add_subdirectory(Python) endif() if (LLDB_ENABLE_LUA) + set(LLDB_HAS_SCRIPT_INTERPRETER TRUE) add_subdirectory(Lua) endif() diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -177,7 +177,8 @@ LLDB_HAS_LIBCXX LLDB_TOOL_LLDB_SERVER_BUILD LLDB_USE_SYSTEM_DEBUGSERVER - LLDB_IS_64_BITS) + LLDB_IS_64_BITS + LLDB_HAS_SCRIPT_INTERPRETER) # Configure the individual test suites. add_subdirectory(API) diff --git a/lldb/test/Shell/Breakpoint/breakpoint-command.test b/lldb/test/Shell/Breakpoint/breakpoint-command.test --- a/lldb/test/Shell/Breakpoint/breakpoint-command.test +++ b/lldb/test/Shell/Breakpoint/breakpoint-command.test @@ -1,3 +1,4 @@ +# REQUIRES: script-interpreter # RUN: %build %p/Inputs/dummy-target.c -o %t.out # RUN: %lldb %t.out -o 'b main' -o 'break command add 1 -o "script print(95000 + 126)"' -o 'r' | FileCheck %s diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py --- a/lldb/test/Shell/lit.cfg.py +++ b/lldb/test/Shell/lit.cfg.py @@ -135,6 +135,9 @@ if config.have_lldb_server: config.available_features.add('lldb-server') +if config.has_script_interpreter: + config.available_features.add('script-interpreter') + # NetBSD permits setting dbregs either if one is root # or if user_set_dbregs is enabled can_set_dbregs = True diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in --- a/lldb/test/Shell/lit.site.cfg.py.in +++ b/lldb/test/Shell/lit.site.cfg.py.in @@ -28,6 +28,8 @@ config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell") config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-shell") +config.has_script_interpreter = @LLDB_HAS_SCRIPT_INTERPRETER@ + import lit.llvm lit.llvm.initialize(lit_config, config)