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.
This commit is contained in:
parent
b57bab5fc1
commit
7082371849
|
@ -4,11 +4,12 @@ make clean
|
||||||
rm -rf coverage_report
|
rm -rf coverage_report
|
||||||
make test CXXFLAGS="-Wall -Wextra -pedantic -g -fprofile-arcs -ftest-coverage"
|
make test CXXFLAGS="-Wall -Wextra -pedantic -g -fprofile-arcs -ftest-coverage"
|
||||||
gcov lib/*.cpp -o lib/
|
gcov lib/*.cpp -o lib/
|
||||||
lcov --directory ./ --capture --output-file lcov.info -b ./
|
lcov --directory ./ --capture --output-file lcov_tmp.info -b ./
|
||||||
|
lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info
|
||||||
genhtml lcov.info -o coverage_report
|
genhtml lcov.info -o coverage_report
|
||||||
rm lib/*.gcda
|
rm lib/*.gcda
|
||||||
rm lib/*.gcno
|
rm lib/*.gcno
|
||||||
rm test/*.gcda
|
rm test/*.gcda
|
||||||
rm test/*.gcno
|
rm test/*.gcno
|
||||||
rm lcov.info
|
rm lcov.info lcov_tmp.info
|
||||||
make clean
|
make clean
|
||||||
|
|
Loading…
Reference in New Issue