[CMake] CMake : Setting up a continuous dashboard

Bill Hoffman bill.hoffman at kitware.com
Wed Aug 12 22:10:39 EDT 2009


Mathieu Malaterre wrote:
> Hi there,
> 
>   I do not understand why the following ctest script (*) does not
> work. I am not seeing the updated files on my cdash server
> 
> (*)
> SET(CTEST_CHECKOUT_COMMAND              "${CTEST_UPDATE_COMMAND} co
> https://path/to/csmtk/ csmtk")
> 
> CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
> FILE(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
> "
> SITE:STRING=${CTEST_SITE}
> BUILDNAME:STRING=${CTEST_BUILD_NAME}
> CMAKE_GENERATOR:INTERNAL=Unix Makefiles
> ")
> SET(CTEST_CONTINUOUS_DURATION 900)
> SET(CTEST_CONTINUOUS_MINIMUM_INTERVAL 10)
> SET(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE TRUE)
> 
> CTEST_START(Continuous)
> CTEST_UPDATE(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
> CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
> CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
> CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
> CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
> CTEST_SUBMIT(RETURN_VALUE res)
> 
> 
> 
You are mixing old and new style scripts.  CTEST_CONTINUOUS_DURATION is 
not used in the new style scripts.  Instead, you use while, something 
like this:

while (${CTEST_ELAPSED_TIME} LESS 36000)
     set (START_TIME ${CTEST_ELAPSED_TIME})
   ctest_start (Continuous)
    ....
    ctest_sleep( ${START_TIME} 300 ${CTEST_ELAPSED_TIME})
endwhile()

-Bill



More information about the CMake mailing list