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 # export CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
14 export TEMPDIR=/tmp/pspp-cov-$$
18 files=`find src -name '*.c'`
20 export summary_file="$TEMPDIR/coverage.txt"
26 gcov -p -l -n -o $dir $f | grep -v '^Creat' >> $summary_file
29 cat > "$TEMPDIR/cov.sps" << EOF
30 DATA LIST FREE FILE='$summary_file' /COVERAGE (PCT8) d1 (a2) lines * d2 (a10) d3 (a10) d4 (a10) d5 (a10) file (a25).
35 /COVERAGE=MIN(COVERAGE).
37 SORT CASES BY COVERAGE.
43 /PERCENTILES=25,50,75,90.
47 src/pspp -o html $TEMPDIR/cov.sps