Code

plugin: Make sdb_plugin_info_t public.
[sysdb.git] / t / coverage.sh
index 8be94cf6e6bac9394a06b0066498206506af9d37..1de97641e0138ed8a663d0c9620b5257ab1421d7 100755 (executable)
@@ -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