views:

306

answers:

1

In the test that I want to run using CTest I should be adding the test that I want to run, with the following command:

add_test(TestName ExeName)

problem is what if I want to supply an argument to the TestName, where do I put it? how do I run ctest individually without cmake in unix command line in this context?

+1  A: 

Insert the following command in the CMakeLists.txt file:

ENABLE_TESTING()

Next add the test(s):

add_test(testname Executable args)

To determine what tests are available, you can always run:

ctest -N

The second way of specifying tests is using explicit test number option -I:

ctest -I 3

will run the test number 3.

Nadir SOUALEM