Tests: Add option to control bootstrap arguments in BootstrapTest

In some environments, `bootstrap` may need explicit arguments to work.
This commit is contained in:
Brad King
2026-06-30 09:30:55 -04:00
parent da073c667f
commit 1853cd2bc1
2 changed files with 7 additions and 2 deletions

View File

@@ -7,9 +7,13 @@ endif()
if(NOT nproc EQUAL 0)
set(parallel_arg --parallel=${nproc})
endif()
message(STATUS "running bootstrap: ${bootstrap} ${ninja_arg} ${parallel_arg}")
if(args)
string(JOIN "\" \"" args_string ${args})
set(args_string " \"${args_string}\"")
endif()
message(STATUS "running bootstrap: ${bootstrap} ${ninja_arg} ${parallel_arg}${args_string}")
execute_process(
COMMAND ${bootstrap} ${ninja_arg} ${parallel_arg}
COMMAND ${bootstrap} ${ninja_arg} ${parallel_arg} ${args}
WORKING_DIRECTORY "${bin_dir}"
RESULT_VARIABLE result
)

View File

@@ -3198,6 +3198,7 @@ if(BUILD_TESTING)
-D "bootstrap=${bootstrap}"
-D "bin_dir=${CMake_BINARY_DIR}/Tests/BootstrapTest"
-D "generator=${CMAKE_GENERATOR}"
-D "args=${CMake_TEST_BOOTSTRAP_ARGS}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/BootstrapTest.cmake
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BootstrapTest")