-
Notifications
You must be signed in to change notification settings - Fork 36
/
.unix.ctest
41 lines (30 loc) · 1.5 KB
/
.unix.ctest
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
set(CTEST_SOURCE_DIRECTORY ".")
set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
find_program(GIT git)
find_program(UNAME uname)
execute_process(COMMAND ${UNAME} -s OUTPUT_VARIABLE OSNAME OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${UNAME} -n OUTPUT_VARIABLE HOST OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${UNAME} -m OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT} rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${GIT} rev-parse HEAD OUTPUT_VARIABLE GIT_COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
string(SUBSTRING ${GIT_COMMIT} 0 7 COMMIT_ID)
set(CTEST_SITE ${HOST})
set(CTEST_BUILD_NAME "${COMMIT_ID}-${OSNAME}-${ARCH}")
configure_file(${CTEST_SOURCE_DIRECTORY}/.git.cfg.in ${CTEST_BINARY_DIRECTORY}/git.cfg)
set(CTEST_NOTES_FILES ${CTEST_BINARY_DIRECTORY}/git.cfg)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_CONFIGURATION "Debug")
set(CTEST_CONFIGURATION_TYPE "Debug")
find_program(CLANG_CHECK clang-check)
find_program(VALGRIND valgrind)
set(CTEST_MEMORYCHECK_COMMAND ${VALGRIND})
set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "-q --track-origins=yes --leak-check=yes --show-reachable=yes --num-callers=50")
set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE ${CTEST_SOURCE_DIRECTORY}/.valgrind.supp)
find_program(GCOV gcov)
set(CTEST_COVERAGE_COMMAND ${GCOV})
ctest_start(Continuous)
ctest_configure()
ctest_build()
ctest_test()
ctest_memcheck()
ctest_coverage()