Add script generate_coverage_report for generating test coverage report using gcov and lcov
This commit is contained in:
parent
8bb812548c
commit
8ed5dad681
|
@ -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
|
Loading…
Reference in New Issue