• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2set(CTEST_SOURCE_DIRECTORY  "@CMAKE_SOURCE_DIR@")
3set(CTEST_BINARY_DIRECTORY  "@CMAKE_BINARY_DIR@")
4set(CTEST_CMAKE_GENERATOR   "@CMAKE_GENERATOR@")
5set(CTEST_BUILD_NAME        "@BUILDNAME@")
6set(CTEST_SITE              "@SITE@")
7
8set(MODEL Experimental)
9if(${CTEST_SCRIPT_ARG} MATCHES Nightly)
10  set(MODEL Nightly)
11elseif(${CTEST_SCRIPT_ARG} MATCHES Continuous)
12  set(MODEL Continuous)
13endif()
14
15find_program(CTEST_HG_COMMAND NAMES hg)
16set(CTEST_UPDATE_COMMAND "${CTEST_HG_COMMAND}")
17
18ctest_start(${MODEL} ${CTEST_SOURCE_DIRECTORY} ${CTEST_BINARY_DIRECTORY})
19
20ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
21ctest_submit(PARTS Update Notes)
22
23# to get CTEST_PROJECT_SUBPROJECTS definition:
24include("${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake")
25
26foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
27  message("")
28  message("Process ${subproject}")
29
30  set_property(GLOBAL PROPERTY SubProject ${subproject})
31  set_property(GLOBAL PROPERTY Label ${subproject})
32
33  ctest_configure(BUILD ${CTEST_BINARY_DIRECTORY} SOURCE ${CTEST_SOURCE_DIRECTORY} )
34  ctest_submit(PARTS Configure)
35
36  set(CTEST_BUILD_TARGET "Build${subproject}")
37  message("Build ${CTEST_BUILD_TARGET}")
38  ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
39  # builds target ${CTEST_BUILD_TARGET}
40  ctest_submit(PARTS Build)
41
42  ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "${subproject}" )
43  # runs only tests that have a LABELS property matching "${subproject}"
44
45  ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}" LABELS "${subproject}" )
46
47  ctest_submit(PARTS Test)
48
49endforeach()
50