Skip to content

Commit 7082371

Browse files
committed
coverage report script: Extract only relevant data from the .info file.
Only files in the current directory are kept. This gets rid of standard C++ library headers from the coverage report.
1 parent b57bab5 commit 7082371

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

generate_coverage_report

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ make clean
44
rm -rf coverage_report
55
make test CXXFLAGS="-Wall -Wextra -pedantic -g -fprofile-arcs -ftest-coverage"
66
gcov lib/*.cpp -o lib/
7-
lcov --directory ./ --capture --output-file lcov.info -b ./
7+
lcov --directory ./ --capture --output-file lcov_tmp.info -b ./
8+
lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info
89
genhtml lcov.info -o coverage_report
910
rm lib/*.gcda
1011
rm lib/*.gcno
1112
rm test/*.gcda
1213
rm test/*.gcno
13-
rm lcov.info
14+
rm lcov.info lcov_tmp.info
1415
make clean

0 commit comments

Comments
 (0)