]> git.donarmstrong.com Git - lilypond.git/commitdiff
pimp coverage scripts further.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 2 Jan 2007 02:44:56 +0000 (03:44 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 2 Jan 2007 02:44:56 +0000 (03:44 +0100)
buildscripts/build-coverage.sh
buildscripts/coverage.py

index 5af2bb1d7f116caf8cb234e5ba41ee48ffdf8e55..13a073188b78e8c5fd928da575143846ee74b427 100755 (executable)
@@ -1,12 +1,31 @@
 #!/bin/sh
-./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
+
+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= >& out-cov/test-run.log
 
+rm -rf out-cov
+mkdir out-cov
+
 cd out-cov
 ln ../lily/* .
 ln ../lily/out-cov/*[ch] .
@@ -16,3 +35,5 @@ for a in *[cyl]
 do
    gcov -o ../lily/out-cov/  -p $a > $a.gcov-summary
 done 
+
+python buildscripts/coverage.py
index e8cb903a97e14b11944675d70eb067e517bb59f9..62a68cb0bb0566a651243d0c028942132d6ea433 100644 (file)
@@ -27,6 +27,12 @@ for f in glob.glob ('*.gcov-summary'):
 
 results.sort ()
 results.reverse()
+
+print 'files sorted by number of untested lines (decreasing)'
+print
+print '%5s (%6s): %s' % ('cov %', 'lines', 'file')
+print '----------------------------------------------'
+
 for (pain, d) in results:
     print '%(cov)5.2f (%(lines)6d): %(file)s' % d