aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2018-09-29 14:36:54 -0400
committerCorey Farrell <git@cfware.com>2018-09-29 14:36:54 -0400
commitef080d17b5bc7cd35b8a0eb524d16683c4def38c (patch)
treee0c25b479155a33a0622834664ab44f5d0cb11a0 /cmake
parent4f91b1d07239a8e818a0a93db5299c25d2cb6cbb (diff)
downloadjansson-ef080d17b5bc7cd35b8a0eb524d16683c4def38c.zip
jansson-ef080d17b5bc7cd35b8a0eb524d16683c4def38c.tar.gz
jansson-ef080d17b5bc7cd35b8a0eb524d16683c4def38c.tar.bz2
Fix code coverage ignored paths.
* Replace 'tests/*' with '*/test/*'. * Replace '/usr/*' with '/usr/include/*'. This resolves an issue where it was impossible to test code coverage with the source in /usr/src. * Ignore build/include/jansson.h as we just want src/jansson.h.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CodeCoverage.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake
index 6575ac7..79ec8ac 100644
--- a/cmake/CodeCoverage.cmake
+++ b/cmake/CodeCoverage.cmake
@@ -111,7 +111,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _outputname _testrunner)
# Capturing lcov counters and generating report
COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info --rc lcov_branch_coverage=1
- COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned --rc lcov_branch_coverage=1
+ COMMAND ${LCOV_PATH} --remove ${_outputname}.info '*/build/include/*' '*/test/*' '/usr/include/*' --output-file ${_outputname}.info.cleaned --rc lcov_branch_coverage=1
COMMAND ${GENHTML_PATH} --branch-coverage -o ${_outputname} ${_outputname}.info.cleaned
COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned