ctest: Make it possible to run a subset of tests listed in a file
I have a project with several hundred tests, and in some cases I want to run certain subsets of these tests. This is hard to do with the current feature set of ctest. The labels are not suitable for that, a really long regexp can be used, but this is not a good solution, to have a command line like "ctest -R (MyTest|FooTest|SomeOtherTest|...more test names follow)".
Instead it would be a good solution to just list the test names in a file, and have ctest execute the tests listed in this file. This is what I implemented in !9018 (closed) . With this I can put
"MyTest
# ThisTestIsCommentedOut
FooTest
SomeOtherTest"
in a file, e.g. mytests.txt, and run ctest with ctest --from-file mytests.txt
I can also run only a subset of the tests by combining it with the -R option: ctest --from-file mytests.txt -R Foo