forked from G-Node/nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.ctest
42 lines (30 loc) · 1.22 KB
/
.travis.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
42
string(SUBSTRING "$ENV{TRAVIS_COMMIT}" 0 7 COMMIT_ID)
set(CTEST_SITE "travis")
set(CTEST_BUILD_NAME "$ENV{TRAVIS_BUILD_NUMBER}-${COMMIT_ID}-$ENV{COMPILER}")
set(CTEST_SOURCE_DIRECTORY "$ENV{TRAVIS_BUILD_DIR}")
set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
configure_file(${CTEST_SOURCE_DIRECTORY}/.travis.cfg.in ${CTEST_BINARY_DIRECTORY}/travis.cfg)
set(CTEST_NOTES_FILES ${CTEST_BINARY_DIRECTORY}/travis.cfg)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_BUILD_TYPE}")
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-4.8)
set(CTEST_COVERAGE_COMMAND ${GCOV})
set(COVERAGE_EXTRA_FLAGS "-l -p")
ctest_start(Continuous)
ctest_configure()
ctest_build()
if(CLANG_CHECK AND $ENV{COMPILER} MATCHES "clang")
ctest_build(TARGET check)
endif()
ctest_test()
if(VALGRIND AND $ENV{COMPILER} MATCHES "clang")
ctest_memcheck()
endif()
ctest_coverage()
ctest_submit()