cryb-to/tools/coverage.sh.in
Dag-Erling Smørgrav 889412ec40 Accept a -jN argument which we pass on to gmake.
Delete all coverage files, not just the root one.
Exit if the tests fail so we can inspect the result.
2014-12-29 17:04:30 +00:00

26 lines
392 B
Bash
Executable file

#!/bin/sh
usage() {
echo "usage: ${0##*/} [-jN]" >&2
exit 1
}
while getopts "j:" opt ; do
case $opt in
j)
j="-j$OPTARG"
;;
*)
usage
;;
esac
done
srcdir="@abs_top_srcdir@"
export COVFILE="${srcdir}/test.cov"
gmake -C "${srcdir}" clean
find "${srcdir}" -type f -name "${COVFILE##*/}" -delete
cov01 -1
gmake -C "${srcdir}" $j check || exit 1
cov01 -0
gmake -C "${srcdir}" clean