Files
CMake/Tests/RunCMake/CTestCommandLine/ScheduleRandomSeed2-check.cmake
Daniel Goldberg d3455f38de ctest: Add option to specify the --schedule-random seed
When `--schedule-random` is used in automated CI jobs, failures may
occur due to test order.  We now log the seed.  Provide a way for
developers to re-run the same order by specifying the seed.

Fixes: #26760
Co-authored-by: Brad King <brad.king@kitware.com>
2025-03-18 14:17:59 -04:00

11 lines
458 B
CMake

string(REGEX MATCHALL "Start [1-5]" ScheduleRandomSeed2_ORDER "${actual_stdout}")
get_property(ScheduleRandomSeed1_ORDER DIRECTORY PROPERTY ScheduleRandomSeed1_ORDER)
if(NOT "${ScheduleRandomSeed1_ORDER}" STREQUAL "${ScheduleRandomSeed2_ORDER}")
string(CONCAT RunCMake_TEST_FAILED
"ScheduleRandomSeed1 order:\n"
" ${ScheduleRandomSeed1_ORDER}\n"
"does not match ScheduleRandomSeed2 order:\n"
" ${ScheduleRandomSeed2_ORDER}\n"
)
endif()