Skip to content

Commit f94ba36

Browse files
committed
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.
1 parent 9ed6773 commit f94ba36

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: buildspec-linux-cmake-gcc-cov.yml

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

Diff for: buildspec-linux-make-gcc-cov.yml

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

0 commit comments

Comments
 (0)