[CMake] cTest: run a single test in a multi-test directory?

Josef 'Jeff' Sipek jeffpc at josefsipek.net
Thu Jul 4 09:36:34 EDT 2013


On Thu, Jul 04, 2013 at 01:25:27PM +0000, Leek, Jim wrote:
> I'm using ctest combined with cmake, to maintain my test suite.  It works pretty well.
> 
> If I want to run all the tests in a directory, I can run 'make test.'
> However, I haven't figured out how to run a single test that is in a
> directory with multiple tests.  For example, I have a PDFTest directory
> that has 7 test, pdf1, pdf2, etc.  If I run 'make test' it runs all 7.
> How could I just run, say, pdf5?

This should do:

ctest -R pdf5

Jeff.

-- 
We have joy, we have fun, we have Linux on a Sun...


More information about the CMake mailing list