Files
cmake/Tests/RunCMake/CTestCommandLine/ConfigureCLIVarDartPersist-check.cmake
Zack Galbreath 433721b7a7 ctest: Pass CTEST_SITE/CTEST_BUILD_NAME to configure step
When performing the configure step in dashboard client mode, propagate
`CTEST_SITE` and `CTEST_BUILD_NAME` as the `SITE` and `BUILDNAME`
respective cache variables.

This causes the values recorded in `DartConfiguration.tcl` to match those
specified by the user, allowing subsequent ctest calls to reuse them
automatically.
2026-06-15 10:56:11 -04:00

14 lines
536 B
CMake

set(dart_file "${RunCMake_TEST_BINARY_DIR}/DartConfiguration.tcl")
if(NOT EXISTS "${dart_file}")
set(RunCMake_TEST_FAILED "DartConfiguration.tcl not found in build dir")
return()
endif()
file(READ "${dart_file}" dart_content)
if(NOT dart_content MATCHES "BuildName: cli-build-name")
set(RunCMake_TEST_FAILED
"DartConfiguration.tcl does not contain BuildName: cli-build-name")
elseif(NOT dart_content MATCHES "Site: cli-site")
set(RunCMake_TEST_FAILED
"DartConfiguration.tcl does not contain Site: cli-site")
endif()