[CMake] simple ctest question: how to run test by number ?

Bill Hoffman bill.hoffman at kitware.com
Fri Nov 15 15:28:30 EST 2013


On 11/15/2013 3:13 PM, Alexander Neundorf wrote:
> Hi,
>
> is there a way to have ctest execute test number x ?
> ctest -Ix doesn't do it, and the examples listed here
> http://cmake.org/Wiki/CMake/Testing_With_CTest#Running_Individual_Tests
> look quite complicated (i.e. more complicated than -R <the_full_test_name>
>
> Alex
   -I [Start,End,Stride,test#,test#|Test file], --tests-information
                               = Run a specific number of tests by number.

So, this will work:

ctest -I N,N

ctest -I 319,319
Test project C:/Users/hoffman/Work/My Builds/cmake-ninja
Guessing configuration NoConfig
     Start 319: CMake.EndStuff
1/1 Test #319: CMake.EndStuff ...................   Passed    0.44 sec



-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573


More information about the CMake mailing list