Remove entries about library code from lcov coverage file

Previously coverage data about header files from the C++ library (in /usr) was
included in the lcov coverage report. We want to exclude these files as we are
only interested in coverage of cprover code and excluding library code also
gives a more accurate percentage of overall coverage.
This commit is contained in:
Daniel Poetzl 2019-07-31 15:44:03 +01:00
parent 9ed67738c1
commit f94ba36daa
2 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ phases:
post_build:
commands:
- lcov --capture --directory build --output-file lcov.info
- lcov --remove lcov.info '/usr/*' --output-file lcov.info
# If $CODEBUILD_SOURCE_VERSION starts with 'pr/', filter out pr number, if not, return empty
- VCS_PULL_REQUEST=$(echo $CODEBUILD_SOURCE_VERSION | sed '/^pr\//!d;s/^pr\///')
# If $CODEBUILD_SOURCE_VERSION is commit id, set $VCS_COMMIT_ID

View File

@ -34,6 +34,7 @@ phases:
- make -C jbmc/unit test
- make -C jbmc/regression test
- lcov --capture --directory . --output-file lcov.info
- lcov --remove lcov.info '/usr/*' --output-file lcov.info
# If $CODEBUILD_SOURCE_VERSION starts with 'pr/', filter out pr number, if not, return empty
- VCS_PULL_REQUEST=$(echo $CODEBUILD_SOURCE_VERSION | sed '/^pr\//!d;s/^pr\///')
# If $CODEBUILD_SOURCE_VERSION is commit id, set $VCS_COMMIT_ID