Skip to content
Snippets Groups Projects
Commit 9e859814 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

exclude unittests from code coverage

parent e9fd5e05
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,9 @@ HIDRA2_MINIMUM_COVERAGE=$3
make ${TARGET}
coverage=`cat ${BINARY_DIR}/${TARGET}.txt`
if [ -z "$coverage" ]; then
coverage=0
fi
if (( coverage < HIDRA2_MINIMUM_COVERAGE )); then
exec >&2
echo
......
......@@ -17,8 +17,9 @@ function(gtest target test_source_files test_libraries)
if(CMAKE_COMPILER_IS_GNUCXX)
include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS()
set (COVERAGE_EXCLUDES 'unittests/*')
SETUP_TARGET_FOR_COVERAGE(NAME coverage-${target} EXECUTABLE test-${target} ${target})
add_test(NAME coveragetest-${target}
add_test(NAME coveragetest-${target}
COMMAND ${CMAKE_MODULE_PATH}/check_test.sh
coverage-${target} ${CMAKE_BINARY_DIR} ${HIDRA2_MINIMUM_COVERAGE}
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment