fix(testcov): install lcov and include testcov only when it's on
This commit is contained in:
parent
6abb7bf2ff
commit
a05b6b476e
2 changed files with 9 additions and 6 deletions
|
@ -116,6 +116,12 @@ install:
|
||||||
sudo apt-get -qq install python python-pip;
|
sudo apt-get -qq install python python-pip;
|
||||||
sudo pip install dropbox;
|
sudo pip install dropbox;
|
||||||
fi
|
fi
|
||||||
|
- if [[ $TESTCOV == ON ]]; then
|
||||||
|
wget http://downloads.sourceforge.net/ltp/lcov-1.10.tar.gz;
|
||||||
|
tar xvfz lcov-1.10.tar.gz;
|
||||||
|
cp -v lcov-1.10/bin/{lcov,genpng,gendesc,genhtml,geninfo} /usr/bin/;
|
||||||
|
rm -rf lcov-1.10.tar.gz lcov-1.10;
|
||||||
|
fi
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- if [[ $LEANREPO == BLESSED && $TRIGGER_BB == TRUE ]]; then
|
- if [[ $LEANREPO == BLESSED && $TRIGGER_BB == TRUE ]]; then
|
||||||
|
|
|
@ -35,8 +35,10 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
|
||||||
|
|
||||||
# Test coverage
|
# Test coverage
|
||||||
if("${TESTCOV}" MATCHES "ON")
|
if("${TESTCOV}" MATCHES "ON")
|
||||||
|
include(CodeCoverage)
|
||||||
message(STATUS "Enable test-coverage")
|
message(STATUS "Enable test-coverage")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -fprofile-arcs -ftest-coverage")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -fprofile-arcs -ftest-coverage")
|
||||||
|
setup_target_for_coverage(cov ${LEAN_SOURCE_DIR}/../script/run_tests.sh coverage)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Compiler-specific C++11 activation.
|
# Compiler-specific C++11 activation.
|
||||||
|
@ -154,9 +156,4 @@ file(GLOB_RECURSE LEAN_SOURCES
|
||||||
${LEAN_SOURCE_DIR}/[A-Za-z]*.cpp
|
${LEAN_SOURCE_DIR}/[A-Za-z]*.cpp
|
||||||
${LEAN_SOURCE_DIR}/[A-Za-z]*.h)
|
${LEAN_SOURCE_DIR}/[A-Za-z]*.h)
|
||||||
add_style_check_target(style "${LEAN_SOURCES}")
|
add_style_check_target(style "${LEAN_SOURCES}")
|
||||||
add_test(NAME style_check
|
add_test(NAME style_check COMMAND ${LEAN_SOURCE_DIR}/cmake/Modules/cpplint.py ${LEAN_SOURCES})
|
||||||
COMMAND ${LEAN_SOURCE_DIR}/cmake/Modules/cpplint.py ${LEAN_SOURCES})
|
|
||||||
|
|
||||||
# Include Code Coverage
|
|
||||||
include(CodeCoverage)
|
|
||||||
setup_target_for_coverage(cov ${LEAN_SOURCE_DIR}/../script/run_tests.sh coverage)
|
|
||||||
|
|
Loading…
Reference in a new issue