[CMake] CTEST_CUSTOM_TESTS_IGNORE regex?

Matthew Woehlke matthew.woehlke at kitware.com
Thu Jan 31 14:02:27 EST 2013


On 2013-01-31 01:19, Leif Walsh wrote:
> In CTestCustom.cmake, I use CTEST_CUSTOM_MEMCHECK_IGNORE and
> CTEST_CUSTOM_TESTS_IGNORE to turn some long-running tests on and off (on
> for nightlies, off for development test cycles).
>
> I recently broke apart a rather large shell script that was used to run a
> test under many scenarios into something like
>
>    foreach (a 0 1)
>      foreach (b 0 1)
>        foreach (c 0 1)
>          add_test(NAME big_test_${a}${b}${c} COMMAND big_test ${a} ${b} ${c})
>        endforeach (c)
>      endforeach (b)
>    endforeach (a)
>
> ...you get the idea.  It generates somewhere in the realm of 2000 test
> cases.  Now they run in parallel, which is great, but I can no longer turn
> off this suite of tests easily.
>
> It would be great to do something like
>
>    list(APPEND CTEST_CUSTOM_TESTS_IGNORE 'big_test_.*')
>
> Is this or something like it supported?

Well, since we're talking about regular expressions, the "list 
separator" is '|'. Have you tried:

set(CTEST_CUSTOM_TESTS_IGNORE
     "${CTEST_CUSTOM_TESTS_IGNORE}|big_test_.*")

...?

(Supporting an *actual* list of regular expressions seems like a nice 
enhancement request, but hopefully the above can work around it for now.)

-- 
Matthew



More information about the CMake mailing list