X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Fcoverage.sh;h=1de97641e0138ed8a663d0c9620b5257ab1421d7;hp=8be94cf6e6bac9394a06b0066498206506af9d37;hb=56b97a180a53aecbfe9f7162b8ece3faae973cf9;hpb=f1a9699e6005585760fc3e165a703cb9069de130 diff --git a/t/coverage.sh b/t/coverage.sh index 8be94cf..1de9764 100755 --- a/t/coverage.sh +++ b/t/coverage.sh @@ -38,24 +38,26 @@ 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" -make +# rebuild build system to refresh version number, etc. +rm -f version +touch configure.ac && make configure -V1=$( grep '^PACKAGE_VERSION' Makefile | cut -d' ' -f3 ) -if test -z "$V1"; then - # this should not happen - V1="$V" -fi +./configure --enable-gcov CFLAGS="-O0 -g" +make lcov --base-directory src --directory src --zerocount make test +# 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 +V=$( ./version-gen.sh ) genhtml -o "$srcdir"/t/coverage \ - -t "SysDB $V1 test coverage" --num-spaces=4 --legend \ + -t "SysDB $V test coverage" --num-spaces=4 --legend \ sysdb_coverage.info