4

I want to run only a certain selection of tests. From the CMake Documentation I found -R <regex> and -E <regex>, so I can run selections like ctest -E UNWANTED_TESTS -R WANTED_TESTS but I would like to be more expressive, specifically I want to combine two strings by or. For example, how do I run tests containing "AAAA" but neither containing "BBBB" nor "CCCC"? Generally, where may I learn more about this kind of regular expressions?

Dominik Kern
  • 146
  • 8
  • Thanks for your question, I felt like I was the only one who couldn't find these informations ! –  Dec 20 '21 at 09:16

1 Answers1

4

ctest -E "BBBB|CCCC" -R "AAAA" did the job. POSIX seems to set the standard, for other unix-utilities as well.

Dominik Kern
  • 146
  • 8
  • It doesn't look like `-R` and `-E` can be combined in a reasonable way. With ctest 3.26.3, when the sets described by `-R` and `-E` overlap, ctest runs all tests `-R` specifies, not excluding any test specified by `-E`. The order of the arguments doesn't matter either. – user686249 Apr 14 '23 at 09:20