aboutsummaryrefslogtreecommitdiff
path: root/libunwind
diff options
context:
space:
mode:
authorAlexander Richardson <alexrichardson@google.com>2023-09-26 07:19:31 -0700
committerGitHub <noreply@github.com>2023-09-26 15:19:31 +0100
commit78d649a417b48cb8a2ba2e755f0e7c8fb8b1bb83 (patch)
treed6f1dcb8d480c62c5d772f43b384014944dcbc94 /libunwind
parentb29b6ccc4e5abb301a8bab037069f0a9b097b247 (diff)
downloadllvm-78d649a417b48cb8a2ba2e755f0e7c8fb8b1bb83.zip
llvm-78d649a417b48cb8a2ba2e755f0e7c8fb8b1bb83.tar.gz
llvm-78d649a417b48cb8a2ba2e755f0e7c8fb8b1bb83.tar.bz2
[libc++][lit] Allow overriding the executor for tests (#66545)
This is useful when trying to run multiple tests with different arguments to the executor script. This is needed in my case since I do not know the correct ssh connection arguments when building libc++. The testing script I have spawns multiple QEMU instances that listen on a given port on localhost and runs lit with the --num-shards/--run-shard argument. In order to connect each shard to the right QEMU instances I need to customize the arguments passed to ssh.py (--extra-ssh-args and --extra-scp-args) but can't do this at configure time since the target port is only known when running the tests but not when calling CMake. This change allows me to pass `executor=ssh.py <args>` to lit once I know the right hostname/port for running the tests. This also deprecates the `LIB{CXX,CXXABI,UNWIND}_EXECUTOR` CMake variable as the same can be achieved by adding `executor=...` to the `LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS` variable.
Diffstat (limited to 'libunwind')
-rw-r--r--libunwind/test/CMakeLists.txt7
-rw-r--r--libunwind/test/configs/cmake-bridge.cfg.in1
2 files changed, 5 insertions, 3 deletions
diff --git a/libunwind/test/CMakeLists.txt b/libunwind/test/CMakeLists.txt
index e6bd526..084da0a 100644
--- a/libunwind/test/CMakeLists.txt
+++ b/libunwind/test/CMakeLists.txt
@@ -10,8 +10,6 @@ endmacro()
pythonize_bool(LIBUNWIND_ENABLE_CET)
pythonize_bool(LIBUNWIND_ENABLE_THREADS)
pythonize_bool(LIBUNWIND_USES_ARM_EHABI)
-set(LIBUNWIND_EXECUTOR "\\\"${Python3_EXECUTABLE}\\\" ${LIBUNWIND_LIBCXX_PATH}/utils/run.py" CACHE STRING
- "Executor to use when running tests.")
set(AUTO_GEN_COMMENT "## Autogenerated by libunwind configuration.\n# Do not edit!")
set(SERIALIZED_LIT_PARAMS "# Lit parameters serialized here for llvm-lit to pick them up\n")
@@ -20,6 +18,11 @@ macro(serialize_lit_param param value)
string(APPEND SERIALIZED_LIT_PARAMS "config.${param} = ${value}\n")
endmacro()
+if (LIBUNWIND_EXECUTOR)
+ message(DEPRECATION "LIBUNWIND_EXECUTOR is deprecated, please add executor=... to LIBUNWIND_TEST_PARAMS")
+ serialize_lit_param(executor "\"${LIBUNWIND_EXECUTOR}\"")
+endif()
+
serialize_lit_param(enable_experimental False)
if (LLVM_USE_SANITIZER)
diff --git a/libunwind/test/configs/cmake-bridge.cfg.in b/libunwind/test/configs/cmake-bridge.cfg.in
index 7860301..c5f34c8 100644
--- a/libunwind/test/configs/cmake-bridge.cfg.in
+++ b/libunwind/test/configs/cmake-bridge.cfg.in
@@ -31,6 +31,5 @@ if not @LIBUNWIND_ENABLE_THREADS@:
# Add substitutions for bootstrapping the test suite configuration
import shlex
config.substitutions.append(('%{cxx}', shlex.quote('@CMAKE_CXX_COMPILER@')))
-config.substitutions.append(('%{executor}', '@LIBUNWIND_EXECUTOR@'))
config.substitutions.append(('%{include}', '@LIBUNWIND_SOURCE_DIR@/include'))
config.substitutions.append(('%{lib}', '@LIBUNWIND_LIBRARY_DIR@'))