From f94ba36daae82ada0c067ea0fd9f33b7d755a330 Mon Sep 17 00:00:00 2001 From: Daniel Poetzl Date: Wed, 31 Jul 2019 15:44:03 +0100 Subject: [PATCH] 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. --- buildspec-linux-cmake-gcc-cov.yml | 1 + buildspec-linux-make-gcc-cov.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/buildspec-linux-cmake-gcc-cov.yml b/buildspec-linux-cmake-gcc-cov.yml index 22e36a4a08..79d77bf3a7 100644 --- a/buildspec-linux-cmake-gcc-cov.yml +++ b/buildspec-linux-cmake-gcc-cov.yml @@ -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 diff --git a/buildspec-linux-make-gcc-cov.yml b/buildspec-linux-make-gcc-cov.yml index 334bf1d20c..f1d622774e 100644 --- a/buildspec-linux-make-gcc-cov.yml +++ b/buildspec-linux-make-gcc-cov.yml @@ -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