[Lldb-commits] [PATCH] D135825: [LLDB] Only run lldb-server Shell tests if it gets built

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 13 13:35:48 PDT 2022


bulbazord updated this revision to Diff 467587.
bulbazord added a comment.

Implement David's suggestion


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135825/new/

https://reviews.llvm.org/D135825

Files:
  lldb/test/CMakeLists.txt
  lldb/test/Shell/lit.cfg.py
  lldb/test/Shell/lit.site.cfg.py.in
  lldb/test/Shell/lldb-server/lit.local.cfg


Index: lldb/test/Shell/lldb-server/lit.local.cfg
===================================================================
--- /dev/null
+++ 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
Index: lldb/test/Shell/lit.site.cfg.py.in
===================================================================
--- lldb/test/Shell/lit.site.cfg.py.in
+++ lldb/test/Shell/lit.site.cfg.py.in
@@ -22,6 +22,7 @@
 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")
Index: lldb/test/Shell/lit.cfg.py
===================================================================
--- lldb/test/Shell/lit.cfg.py
+++ lldb/test/Shell/lit.cfg.py
@@ -132,6 +132,9 @@
 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
Index: lldb/test/CMakeLists.txt
===================================================================
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -167,6 +167,7 @@
   LLVM_ENABLE_ZLIB
   LLVM_ENABLE_SHARED_LIBS
   LLDB_HAS_LIBCXX
+  LLDB_TOOL_LLDB_SERVER_BUILD
   LLDB_USE_SYSTEM_DEBUGSERVER
   LLDB_IS_64_BITS)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135825.467587.patch
Type: text/x-patch
Size: 1712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221013/9319209f/attachment.bin>


More information about the lldb-commits mailing list