You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenPAM/misc/coverage.sh.in

34 lines
575 B
Bash

#!/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
if ! which -s cov01 covhtml ; then
echo "coverage tools not found" >&2
exit 1
fi
srcdir="@abs_top_srcdir@"
htmldir="${srcdir}/covhtml"
export COVFILE="${srcdir}/test.cov"
gmake -C "${srcdir}" clean
find "${srcdir}" -type f -name "${COVFILE##*/}" -delete
rm -rf "${htmldir}"
cov01 -1
gmake -C "${srcdir}" $j check || exit 1
covhtml -d "${srcdir}" -f "${COVFILE}" "${htmldir}"
cov01 -0
gmake -C "${srcdir}" clean