Hi,

We have our project set up to run a series of test cases, but we are treating 
it as if we are not using CMake. I found a tutorial online on how to set it up, 
and we have it running just fine when we want to run all of the tests. But, I 
haven't figured out how to do the configure/build steps for selected tests 
only. 

For example, each test has it's own configure command and build command. If I 
do 

ctest -I 2,2

then it configures and builds all the tests, but will only run the second test. 

The driver script contains a section like:

foreach(TESTCASE ${LESLIE_AVAILABLE_TESTCASES})
  set(CTEST_CONFIGURE_COMMAND "./setup.py -t ${TESTCASE} 
${LESLIE_CONFIGURE_DICT}")
  ctest_configure(BUILD "${CTEST_REPO_DIRECTORY}" APPEND)
  set(CTEST_BUILD_COMMAND "./setup.py -t ${TESTCASE} ${LESLIE_BUILD_DICT}")
  ctest_build(BUILD "${CTEST_REPO_DIRECTORY}" APPEND)
endforeach()

and the LESLIE_AVAILABLE_TESTCASES is a list of test cases names that match the 
add_test() test names. Is it possible when running CTest with -I or -R (or even 
without -I or -R) to figure out which tests it selects so we can build 
LESLIE_AVAILABLE_TESTCASES from that?

Thanks,

Tim
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to