3 # This little script can be used in conjunction with gcov to see how well
4 # the regression test suite is covering the PSPP code.
9 # CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
15 TEMPDIR
=/tmp
/pspp-cov-$$
20 files
=`find src -name '*.c'`
22 summary_file
="$TEMPDIR/coverage.txt"
29 gcov
-p -l -n -o $dir $f |
grep -v '^Creat' >> $summary_file
32 cat > "$TEMPDIR/cov.sps" << EOF
33 DATA LIST FREE FILE='$summary_file' /COVERAGE (PCT8) d1 (a2) lines * d2 (a10) d3 (a10) d4 (a10) d5 (a10) file (a25).
38 /COVERAGE=MIN(COVERAGE).
40 SORT CASES BY COVERAGE.
46 /PERCENTILES=25,50,75,90.
50 src
/pspp
-o pspp.html
$TEMPDIR/cov.sps