-
Notifications
You must be signed in to change notification settings - Fork 0
/
TECA_dashboard.cmake
57 lines (57 loc) · 1.88 KB
/
TECA_dashboard.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# general config
set(CTEST_PROJECT_NAME "TECA")
set(CTEST_NOTES_FILES)
set(DASHBOARD_TYPE $ENV{DASHBOARD_TYPE})
if (NOT DEFINED ALWAYS_UPDATE)
if (DASHBOARD_TYPE STREQUAL "Continuous")
set(ALWAYS_UPDATE OFF)
else()
set(ALWAYS_UPDATE ON)
endif()
endif()
if (NOT DEFINED INCREMENTAL_BUILD)
if (DASHBOARD_TYPE STREQUAL "Continuous")
set(INCREMENTAL_BUILD ON)
else()
set(INCREMENTAL_BUILD OFF)
endif()
endif()
if (NOT DEFINED DASHBOARD_RELIABLE)
set(DASHBOARD_TRACK "Experimental")
else()
if (NOT DEFINED DASHBOARD_TRACK)
set(DASHBOARD_TRACK ${DASHBOARD_TYPE})
endif()
endif()
set(DATA_ROOT "${CTEST_DASHBOARD_ROOT}/TECA_data")
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${DASHBOARD_TYPE}/TECA")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${DASHBOARD_TYPE}/build")
if (NOT CTEST_TEST_TIMEOUT)
set(CTEST_TEST_TIMEOUT 120)
endif()
# run the tests
if (NOT INCREMENTAL_BUILD)
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt"
${INITIAL_CACHE})
endif()
set(nSrcUpdated 0)
set(nDataUpdated 0)
set(nTestUpdated 0)
set(nUpdated 0)
ctest_start("${DASHBOARD_TRACK}")
set(CTEST_UPDATE_COMMAND "${CTEST_SVN_COMMAND}")
ctest_update(SOURCE "${DATA_ROOT}" RETURN_VALUE nDataUpdated)
set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE nSrcUpdated)
math(EXPR nUpdated "${nSrcUpdated}+${nDataUpdated}+${nTestUpdated}")
if (ALWAYS_UPDATE OR (nUpdated GREATER 0))
ctest_configure()
ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
ctest_build()
ctest_submit(PARTS Update Configure Build Notes RETRY_DELAY 15 RETRY_COUNT 10)
ctest_test()
ctest_submit(PARTS Test RETRY_DELAY 15 RETRY_COUNT 10)
ctest_memcheck()
ctest_submit(PARTS MemCheck RETRY_DELAY 15 RETRY_COUNT 10)
endif()