Modify the coverage build script so that it only runs "make clean" if

coverage was not already enabled when the script was started.
This commit is contained in:
Dag-Erling Smørgrav 2015-10-03 14:30:24 +00:00 committed by des
parent dd18cd2995
commit 1826bb12bf

View file

@ -16,11 +16,25 @@ while getopts "j:" opt ; do
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
find "${srcdir}" -type f -name "${COVFILE##*/}" -delete
cov01 -1
gmake -C "${srcdir}" $j check || exit 1
fi
covclear
gmake -C "${srcdir}" $j check
covhtml "${htmldir}"
if ! $cov ; then
# Clean up
cov01 -0
gmake -C "${srcdir}" clean
fi