]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/build-coverage.sh
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / buildscripts / build-coverage.sh
index cdf31dd7d3249b58b339807939b394dc1f5cb1dd..13a073188b78e8c5fd928da575143846ee74b427 100755 (executable)
@@ -1,17 +1,39 @@
 #!/bin/sh
-./configure --enable-config=cov --disable-optimising
-make conf=cov -j2 clean
-perl -i~ -pe 's/-pipe /-fprofile-arcs -ftest-coverage/g' config-cov.make
+
+if test "$1" == "--fresh"; then
+  fresh=yes
+fi
+
+if test ! -f config-cov.make; then
+  fresh=yes
+fi
+
+if test "$fresh" = "yes";
+then
+  ./configure --enable-config=cov --disable-optimising
+  make conf=cov -j2 clean
+  perl -i~ -pe 's/-pipe /-fprofile-arcs -ftest-coverage -pipe /g' config-cov.make
+  perl -i~ -pe 's/ -ldl / -lgcov -ldl /g' config-cov.make
+else
+  find -name '*.gcda' -exec rm  '{}' ';'
+fi
+
+
 make conf=cov -j2
 make conf=cov test-clean LILYPOND_JOBS=          
-make conf=cov test LILYPOND_JOBS=          
+make conf=cov test LILYPOND_JOBS= >& out-cov/test-run.log
+
+rm -rf out-cov
+mkdir out-cov
 
 cd out-cov
 ln ../lily/* .
-ln ../lily/out-conv/*cc .
+ln ../lily/out-cov/*[ch] .
 mkdir include
 ln ../lily/include/* include/
 for a in *[cyl]
 do
    gcov -o ../lily/out-cov/  -p $a > $a.gcov-summary
 done 
+
+python buildscripts/coverage.py