mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-11-23 06:05:46 +00:00
1826bb12bf
coverage was not already enabled when the script was started.
40 lines
530 B
Bash
Executable file
40 lines
530 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
|
|
|
|
if cov01 -sq >/dev/null ; then
|
|
cov=true
|
|
else
|
|
cov=false
|
|
fi
|
|
|
|
srcdir="@abs_top_srcdir@"
|
|
htmldir="${srcdir}/cov"
|
|
export COVFILE="${srcdir}/test.cov"
|
|
if ! $cov ; then
|
|
# Rebuild with coverage enabled
|
|
gmake -C "${srcdir}" clean
|
|
cov01 -1
|
|
fi
|
|
covclear
|
|
gmake -C "${srcdir}" $j check
|
|
covhtml "${htmldir}"
|
|
if ! $cov ; then
|
|
# Clean up
|
|
cov01 -0
|
|
gmake -C "${srcdir}" clean
|
|
fi
|