Add a pair of scripts to facilitate running Bullseye Coverage and Coverity
Scan on the codebase. git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@917 185d5e19-27fe-0310-9dcf-9bff6b9f3609remotes/origin/tags/openpam-20170219
parent
82935b7d7a
commit
2f340d61b5
@ -0,0 +1 @@
|
||||
noinst_SCRIPTS = coverage.sh coverity.sh
|
@ -0,0 +1,33 @@
|
||||
#!/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
|
@ -0,0 +1,37 @@
|
||||
#!/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 ; then
|
||||
cov01="$(which cov01)"
|
||||
fi
|
||||
covint="cov-int"
|
||||
covlog="${covint}/build-log.txt"
|
||||
srcdir="@abs_top_srcdir@"
|
||||
cd "${srcdir}" || exit 1
|
||||
rm -rf "${covint}"
|
||||
gmake clean || exit 1
|
||||
"${cov01:-:}" -q -u
|
||||
"${cov01:-:}" -q -0
|
||||
cov-build --dir "${covint}" gmake "$@"
|
||||
"${cov01:-:}" -q -o
|
||||
gmake clean
|
||||
if tail -1 "${covlog}" | grep -q "completed successfully" ; then
|
||||
tar caf "@PACKAGE@-@PACKAGE_VERSION@-cov-int.txz" "${covint}"
|
||||
else
|
||||
tail "${covlog}"
|
||||
fi
|
Loading…
Reference in New Issue