diff --git a/.travis.yml b/.travis.yml index 37b5bbb5..b0a974a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,10 +32,11 @@ script: - mkdir build - cd build - cmake -D STATIC=$STATIC -D BENCHMARKS=$BENCHMARKS -D SAMPLES=$SAMPLES -D COVERAGE=$COVERAGE -D CMAKE_CXX_COMPILER=$COMPILER -D CMAKE_BUILD_TYPE=Debug .. - - cmake --build . + - make VERBOSE=1 - ./tests/xlnt.test after_success: - - strings tests/xlnt.test | grep gcda + - find . -name "*.gcda" + - pwd - lcov --compat-libtool --directory source/CMakeFiles/xlnt.dir --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-6 - coveralls-lcov coverage.info diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b2791400..22c2eaac 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -40,7 +40,7 @@ set(RUNNER "${CMAKE_CURRENT_BINARY_DIR}/runner-autogen.cpp") set_source_files_properties(${RUNNER} PROPERTIES GENERATED TRUE) if(COVERAGE) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov --coverage") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage") endif() set(CXXTEST_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../third-party/cxxtest)