]> git.donarmstrong.com Git - lilypond.git/blob - buildscripts/build-coverage.sh
updates for coverage scripts
[lilypond.git] / buildscripts / build-coverage.sh
1 #!/bin/sh
2
3 if test "$1" == "--fresh"; then
4   fresh=yes
5 fi
6
7 if test ! -f config-cov.make; then
8   fresh=yes
9 fi
10
11 if test "$fresh" = "yes";
12 then
13   ./configure --enable-config=cov --disable-optimising \
14    &&   make conf=cov -j2 clean \
15    &&   perl -i~ -pe 's/-pipe /-fprofile-arcs -ftest-coverage -pipe /g' config-cov.make \
16    &&   perl -i~ -pe 's/ -ldl / -lgcov -ldl /g' config-cov.make
17 else
18   find -name '*.gcda' -exec rm  '{}' ';'
19 fi
20
21
22 make conf=cov -j2 &&  \
23   make conf=cov test-real-clean LILYPOND_JOBS= && \
24   make conf=cov test LILYPOND_JOBS= >& out-cov/test-run.log
25
26 if test "$?" != "0"; then
27   tail -100 out-cov/test-run.log
28   exit 1
29 fi
30
31 rm -rf out-cov
32 mkdir out-cov
33
34 cd out-cov
35 ln ../lily/* .
36 ln ../lily/out-cov/*[ch] .
37 mkdir include
38 ln ../lily/include/* include/
39 for a in *[cyl]
40 do
41    gcov -o ../lily/out-cov/  -p $a > $a.gcov-summary
42 done 
43
44 cat <<EOF
45
46 now run 
47
48          python buildscripts/coverage.py
49
50 EOF