X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Fcoverage.sh;h=a689b571156166dc7a90bb972d7817153d23a4d9;hb=a58f4c5ace18595f3cdaf731078028d747d5d9bd;hp=5dabb13955277df4f73627a72b14eb87ed1b1455;hpb=fad5683471d094f4e4e77da928ff9de3e7d19e5e;p=sysdb.git diff --git a/t/coverage.sh b/t/coverage.sh index 5dabb13..a689b57 100755 --- a/t/coverage.sh +++ b/t/coverage.sh @@ -38,16 +38,27 @@ if test -d "$srcdir"/.git/; then cp -a "$srcdir"/.git . # reset all files which are not part of the tarball - git checkout HEAD .gitignore .travis.yml + 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 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 + --capture -o sysdb_coverage.info \ + || lcov --base-directory src --directory src \ + --capture -o sysdb_coverage.info +for pattern in '*.y' '*.l'; do + lcov --remove sysdb_coverage.info "$pattern" -o sysdb_coverage.info +done V=$( ./version-gen.sh ) genhtml -o "$srcdir"/t/coverage \