[libc++] Allow specifying arbitrary custom executors with the new format
The integration between CMake and executor selection in the new format
wasn't very flexible -- only the default executor and SSH executors were
supported.
This patch makes it possible to specify arbitrary executors with the new
format. With the new testing format, a custom executor is just a script
that gets called with a command-line to execute, and some arguments like
--env, --codesign_identity and --execdir. As such, the default executor
is just run.py.
Remote execution with the SSH executor can be achived by specifying
LIBCXX_EXECUTOR="<path-to-ssh.py> --host <host>". Similarly, arbitrary
scripts can be provided.
GitOrigin-RevId: 96e6cbbf941d0f937b7e823433d4c222967a1817
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index bedfce8..2160f52 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -32,7 +32,7 @@
endif()
if(DEFINED LIBCXX_ENABLE_STATIC
- AND NOT LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX
+ AND NOT LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX
AND NOT LIBCXX_ENABLE_STATIC)
message(FATAL_ERROR "LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX being OFF requires LIBCXX_ENABLE_STATIC to be ON")
endif()
@@ -50,7 +50,7 @@
pythonize_bool(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI)
set(LIBCXXABI_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING
"TargetInfo to use when setting up test environment.")
-set(LIBCXXABI_EXECUTOR "None" CACHE STRING
+set(LIBCXXABI_EXECUTOR "${Python3_EXECUTABLE} ${LIBCXXABI_LIBCXX_PATH}/utils/run.py" CACHE STRING
"Executor to use when running tests.")
set(AUTO_GEN_COMMENT "## Autogenerated by libcxxabi configuration.\n# Do not edit!")