2009-10-05 09:51:09 +02:00
|
|
|
#!/bin/bash
|
2010-06-01 20:20:19 +02:00
|
|
|
set -e
|
2009-10-05 09:51:09 +02:00
|
|
|
make clean
|
2010-06-01 20:20:19 +02:00
|
|
|
rm -rf coverage_report
|
2009-10-05 09:51:09 +02:00
|
|
|
make test CXXFLAGS="-Wall -Wextra -pedantic -g -fprofile-arcs -ftest-coverage"
|
2009-10-26 17:56:56 +01:00
|
|
|
gcov lib/*.cpp -o lib/
|
2010-06-01 20:21:29 +02:00
|
|
|
lcov --directory ./ --capture --output-file lcov_tmp.info -b ./
|
|
|
|
lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info
|
2009-10-05 09:51:09 +02:00
|
|
|
genhtml lcov.info -o coverage_report
|
2009-10-26 17:56:56 +01:00
|
|
|
rm lib/*.gcda
|
|
|
|
rm lib/*.gcno
|
2009-10-05 10:51:23 +02:00
|
|
|
rm test/*.gcda
|
|
|
|
rm test/*.gcno
|
2010-06-01 20:21:29 +02:00
|
|
|
rm lcov.info lcov_tmp.info
|
2009-10-05 09:51:09 +02:00
|
|
|
make clean
|