Add script generate_coverage_report for generating test coverage report using gcov and lcov

This commit is contained in:
Reijo Tomperi 2009-10-05 10:51:09 +03:00
parent 8bb812548c
commit 8ed5dad681
1 changed files with 11 additions and 0 deletions

11
generate_coverage_report Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
make clean
rm -r coverage_report
make test CXXFLAGS="-Wall -Wextra -pedantic -g -fprofile-arcs -ftest-coverage"
gcov src/*.cpp -o src/
lcov --directory ./ --capture --output-file lcov.info -b ./
genhtml lcov.info -o coverage_report
rm src/*.gcda
rm src/*.gcno
rm lcov.info
make clean