I have some cmake code that generates test names. It has a base-test name followed by some identifier. An example would be this: which is in a loop and the id’s and args are different.
ADD_TEST (NAME “${APT_TEST_NAME}-${TEST_ID}” COMMAND “${MY_COMMAND}” ${ARG_LIST})
This works just fine in that I can execute that test in CTEST.
What I want to do is to serialize all those base tests even when running with a large ctest_parallel_level.
I’ve tried created a string list of all the related ${APT_TEST_NAME}-${TEST_ID} like this:
STRING(APPEND TEST_LIST “${APT_TEST_NAME}-${TEST_ID}”)
– but I can’t seem to cajole SET_TESTS_PROPERTIES() to understand a test list. I’ve monkeyed with quote/no-quotes, etc.
Example:
SET_TESTS_PROPERTIES(“${TEST_LIST}” PROPERTIES RUN_SERIAL TRUE)
CMAKE tells me each time that the conjoined test names is a test that cannot be found.
Is there a better way to tackle this? Or am I on the right track but have missed a subtle nuance?