X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Fcoverage.sh;h=3a8a4167cca689839ed6dc8faaeb07ac4ec101f0;hb=b072d9b2786422fcb8f068dd5076bd108a6228e9;hp=6acf8c96faa2ec520fb6ba0c64c1ae24db6f3423;hpb=72a63cfb0e65bb575889b8dbee6648cafd6a52f2;p=sysdb.git diff --git a/t/coverage.sh b/t/coverage.sh index 6acf8c9..3a8a416 100755 --- a/t/coverage.sh +++ b/t/coverage.sh @@ -41,16 +41,27 @@ if test -d "$srcdir"/.git/; then git checkout HEAD .gitignore .travis.yml t/cibuild.sh fi -./configure --enable-gcov --disable-shared CFLAGS="-O0 -g" +# rebuild build system to refresh version number, etc. +rm -f version +touch configure.ac && make configure + +./configure --enable-gcov CFLAGS="-O0 -g" make lcov --base-directory src --directory src --zerocount -make test +make -j25 test || (status=$?; cat t/test-suite.log 2> /dev/null; exit $status) + # old versions of lcov don't support --no-external lcov --base-directory src --directory src --no-external \ --capture -o sysdb_coverage.info \ || lcov --base-directory src --directory src \ --capture -o sysdb_coverage.info +for pattern in '*.y' '*.l' \ + 'sysdb/scanner.c' 'frontend/scanner.c' 'liboconfig/scanner.c' \ + 'frontend/grammar.c' 'liboconfig/parser.c' +do + lcov --remove sysdb_coverage.info "$pattern" -o sysdb_coverage.info +done V=$( ./version-gen.sh ) genhtml -o "$srcdir"/t/coverage \