[CMake] bug in ctest (2.6.3)?

Clemens Arth clemens.arth at gmx.at
Tue Mar 3 05:16:08 EST 2009


Hi guys,

by now I was working with 2.6.2 and used a script to run multiple 
builds/tests sequentially with the following structure:

<snip>
...
  # run for the first time

  SET(CTEST_SOURCE_DIRECTORY                             "${SOURCEROOTABS}")
  SET(CTEST_BINARY_DIRECTORY                             
"${SOURCEROOTABS}/build/${VCVERSION}.XP1.cm")
 
  SET(CTEST_BUILD_NAME                    "Win32-${VCVERSION}-first_run")
 
  SET(CTEST_CMAKE_GENERATOR               "${VSGEN}") 
 
  CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
  
CONFIGURE_FILE(${CTEST_SOURCE_DIRECTORY}/CTestExperimentalTemplate1.cmake 
${CTEST_BINARY_DIRECTORY}/CTestExperimental.cmake)
  CTEST_RUN_SCRIPT(${CTEST_BINARY_DIRECTORY}/CTestExperimental.cmake)

  # run for the second time

  SET(CTEST_SOURCE_DIRECTORY                             "${SOURCEROOTABS}")
  SET(CTEST_BINARY_DIRECTORY                             
"${SOURCEROOTABS}/build/${VCVERSION}.XP2.cm")
 
  SET(CTEST_BUILD_NAME                    "Win32-${VCVERSION}-second_run")
 
  SET(CTEST_CMAKE_GENERATOR               "${VSGEN}") 
 
  CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
  
CONFIGURE_FILE(${CTEST_SOURCE_DIRECTORY}/CTestExperimentalTemplate2.cmake 
${CTEST_BINARY_DIRECTORY}/CTestExperimental.cmake)
  CTEST_RUN_SCRIPT(${CTEST_BINARY_DIRECTORY}/CTestExperimental.cmake)

...
<snip>

the CTestExperimentalTemplate{1,2}.cmake files contain the setup for 
building, testing and submitting.

<snip>
...
CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_READ_CUSTOM_FILES("${CTEST_BINARY_DIRECTORY}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
IF(NOT CMAKE_HOST_WIN32)
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
ENDIF(NOT CMAKE_HOST_WIN32)
#CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
CTEST_SUBMIT(RETURN_VALUE res)
<snip>

Until now, this worked well, but now it seems that CTEST_RUN_SCRIPT is 
only called once and, not as expected, multiple times one after each 
other. I guess this is not the intended behaviour... Can anyone 
reproduce this?

Regards
Clemens





More information about the CMake mailing list