[Lldb-commits] [lldb] 0cfa501 - [LLDB] Only run lldb-server Shell tests if it gets built
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 14 12:01:09 PDT 2022
Author: Alex Langford
Date: 2022-10-14T12:00:57-07:00
New Revision: 0cfa50154a47eb65de5bc687f6565625f556edc8
URL: https://github.com/llvm/llvm-project/commit/0cfa50154a47eb65de5bc687f6565625f556edc8
DIFF: https://github.com/llvm/llvm-project/commit/0cfa50154a47eb65de5bc687f6565625f556edc8.diff
LOG: [LLDB] Only run lldb-server Shell tests if it gets built
It's easy enough to disable the lldb-server build. The lldb-server unit
tests already have logic to disable them if we don't build, so this just
makes it even.
Reviewed By: DavidSpickett
Differential Revision: https://reviews.llvm.org/D135825
Added:
lldb/test/Shell/lldb-server/lit.local.cfg
Modified:
lldb/test/CMakeLists.txt
lldb/test/Shell/lit.cfg.py
lldb/test/Shell/lit.site.cfg.py.in
Removed:
################################################################################
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 64a9082df52eb..17572f9a0d8fd 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -167,6 +167,7 @@ llvm_canonicalize_cmake_booleans(
LLVM_ENABLE_ZLIB
LLVM_ENABLE_SHARED_LIBS
LLDB_HAS_LIBCXX
+ LLDB_TOOL_LLDB_SERVER_BUILD
LLDB_USE_SYSTEM_DEBUGSERVER
LLDB_IS_64_BITS)
diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index 9fd206b4b373b..7717400f0de1b 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -132,6 +132,9 @@ def calculate_arch_features(arch_string):
if config.lldb_system_debugserver:
config.available_features.add('system-debugserver')
+if config.have_lldb_server:
+ config.available_features.add('lldb-server')
+
# 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
index 29d309ca91836..d58918c873153 100644
--- a/lldb/test/Shell/lit.site.cfg.py.in
+++ b/lldb/test/Shell/lit.site.cfg.py.in
@@ -22,6 +22,7 @@ config.lldb_bitness = 64 if @LLDB_IS_64_BITS@ else 32
config.lldb_enable_python = @LLDB_ENABLE_PYTHON@
config.lldb_enable_lua = @LLDB_ENABLE_LUA@
config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@"
+config.have_lldb_server = @LLDB_TOOL_LLDB_SERVER_BUILD@
config.lldb_system_debugserver = @LLDB_USE_SYSTEM_DEBUGSERVER@
# The shell tests use their own module caches.
config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell")
diff --git a/lldb/test/Shell/lldb-server/lit.local.cfg b/lldb/test/Shell/lldb-server/lit.local.cfg
new file mode 100644
index 0000000000000..6ede36a690441
--- /dev/null
+++ b/lldb/test/Shell/lldb-server/lit.local.cfg
@@ -0,0 +1,3 @@
+# These tests rely on lldb-server
+if not config.have_lldb_server:
+ config.unsupported = True
More information about the lldb-commits
mailing list