[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
Wed Oct 12 16:07:41 PDT 2022
bulbazord created this revision.
bulbazord added reviewers: labath, JDevlieghere.
Herald added a project: All.
bulbazord requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
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.
Repository:
rG LLVM Github Monorepo
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/TestErrorMessages.test
lldb/test/Shell/lldb-server/TestGdbserverPort.test
Index: lldb/test/Shell/lldb-server/TestGdbserverPort.test
===================================================================
--- lldb/test/Shell/lldb-server/TestGdbserverPort.test
+++ lldb/test/Shell/lldb-server/TestGdbserverPort.test
@@ -1,4 +1,5 @@
# Windows does not build lldb-server.
+# REQUIRES: lldb-server
# UNSUPPORTED: system-windows
# RUN: %platformserver --server --listen :1234 --min-gdbserver-port 1234 --max-gdbserver-port 1234 2>&1 | FileCheck %s
# CHECK: error: --min-gdbserver-port (1234) is not lower than --max-gdbserver-port (1234)
Index: lldb/test/Shell/lldb-server/TestErrorMessages.test
===================================================================
--- lldb/test/Shell/lldb-server/TestErrorMessages.test
+++ lldb/test/Shell/lldb-server/TestErrorMessages.test
@@ -1,3 +1,5 @@
+REQUIRES: lldb-server
+
RUN: %lldb-server gdbserver --fd 2>&1 | FileCheck --check-prefixes=FD1,ALL %s
FD1: error: --fd: missing argument
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.467290.patch
Type: text/x-patch
Size: 2372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221012/d1069dbb/attachment.bin>
More information about the lldb-commits
mailing list