Code

coverage.sh: Ignore *.y / *.l files.
[sysdb.git] / t / coverage.sh
index 6acf8c96faa2ec520fb6ba0c64c1ae24db6f3423..bb766427234e5c53513b5fd0d434cebfcd3b1b4a 100755 (executable)
@@ -41,7 +41,11 @@ 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
@@ -51,6 +55,9 @@ 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'; do
+       lcov --remove sysdb_coverage.info "$pattern" -o sysdb_coverage.info
+done
 
 V=$( ./version-gen.sh )
 genhtml -o "$srcdir"/t/coverage \