https://github.com/charles-zablit updated https://github.com/llvm/llvm-project/pull/197660
>From c7d6747bb49a3663784ac964878b880cfb4d9584 Mon Sep 17 00:00:00 2001 From: Charles Zablit <[email protected]> Date: Thu, 14 May 2026 01:09:34 +0100 Subject: [PATCH 1/2] [lldb][test] Propagate LLDB_USE_LLDB_SERVER to Windows tests --- lldb/test/API/lit.cfg.py | 2 +- lldb/test/Shell/lit.cfg.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py index c92b104c9227c..244efab364a70 100644 --- a/lldb/test/API/lit.cfg.py +++ b/lldb/test/API/lit.cfg.py @@ -354,7 +354,7 @@ def delete_module_cache(path): # Transfer some environment variables into the tests on Windows build host. if platform.system() == "Windows": - for v in ["SystemDrive"]: + for v in ["SystemDrive", "LLDB_USE_LLDB_SERVER"]: if v in os.environ: config.environment[v] = os.environ[v] # Use anonymous pipes instead of ConPTY for all tests. ConPTY injects VT diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py index 64107001e3aae..cab1eea69feba 100644 --- a/lldb/test/Shell/lit.cfg.py +++ b/lldb/test/Shell/lit.cfg.py @@ -54,6 +54,7 @@ "TEMP", "TMP", "XDG_CACHE_HOME", + "LLDB_USE_LLDB_SERVER", ] ) >From 1b15d2d70692f14c7a01068511d139a7626de394 Mon Sep 17 00:00:00 2001 From: Charles Zablit <[email protected]> Date: Mon, 18 May 2026 16:40:13 +0200 Subject: [PATCH 2/2] fixup! [lldb][test] Propagate LLDB_USE_LLDB_SERVER to Windows tests --- lldb/test/API/CMakeLists.txt | 1 + lldb/test/API/lit.cfg.py | 12 +++++++++++- lldb/test/API/lit.site.cfg.py.in | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt index 0738278c63a9c..6b7f954a87776 100644 --- a/lldb/test/API/CMakeLists.txt +++ b/lldb/test/API/CMakeLists.txt @@ -92,6 +92,7 @@ set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb exec set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors") set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles") set(LLDB_TEST_MAKE "${LLDB_DEFAULT_TEST_MAKE}" CACHE PATH "make tool used for building test executables") +set(LLDB_TEST_USE_LLDB_SERVER "" CACHE STRING "If ON/1, run the API test suite against the lldb-server backend on Windows") if ("${LLDB_TEST_COMPILER}" STREQUAL "") message(FATAL_ERROR "LLDB test compiler not specified. Tests will not run.") diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py index 244efab364a70..455315a78a37c 100644 --- a/lldb/test/API/lit.cfg.py +++ b/lldb/test/API/lit.cfg.py @@ -354,9 +354,19 @@ def delete_module_cache(path): # Transfer some environment variables into the tests on Windows build host. if platform.system() == "Windows": - for v in ["SystemDrive", "LLDB_USE_LLDB_SERVER"]: + for v in ["SystemDrive"]: if v in os.environ: config.environment[v] = os.environ[v] + + use_server = lit_config.params.get("lldb-use-lldb-server", None) + if use_server is None: + use_server = getattr(config, "lldb_use_lldb_server", None) + if use_server is not None and str(use_server).lower() in ( + "1", "on", "yes", "true" + ): + lit_config.note("Running API tests with LLDB_USE_LLDB_SERVER=1") + config.environment["LLDB_USE_LLDB_SERVER"] = "1" + # Use anonymous pipes instead of ConPTY for all tests. ConPTY injects VT # escape sequences into the output stream, which breaks tests that check # for specific stdout/stderr content. diff --git a/lldb/test/API/lit.site.cfg.py.in b/lldb/test/API/lit.site.cfg.py.in index b7cd281425d7e..7c6498c4912a0 100644 --- a/lldb/test/API/lit.site.cfg.py.in +++ b/lldb/test/API/lit.site.cfg.py.in @@ -45,6 +45,7 @@ config.libcxx_include_target_dir = "@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@" config.lldb_launcher = "@LLDB_LAUNCHER@" config.lldb_enable_mte = @LLDB_ENABLE_MTE@ config.lldb_enable_arm64e_debugserver = @LLDB_USE_ARM64E_DEBUGSERVER@ +config.lldb_use_lldb_server = "@LLDB_TEST_USE_LLDB_SERVER@" # The API tests use their own module caches. config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-api") config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-api") _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
