source: openpam/trunk/misc/coverage.sh.in @ 917

Last change on this file since 917 was 917, checked in by Dag-Erling Smørgrav, 4 years ago

Add a pair of scripts to facilitate running Bullseye Coverage and Coverity
Scan on the codebase.

File size: 575 bytes
Line 
1#!/bin/sh
2
3usage() {
4        echo "usage: ${0##*/} [-jN]" >&2
5        exit 1
6}
7
8while getopts "j:" opt ; do
9        case $opt in
10        j)
11                j="-j$OPTARG"
12                ;;
13        *)
14                usage
15                ;;
16        esac
17done
18
19if ! which -s cov01 covhtml ; then
20        echo "coverage tools not found" >&2
21        exit 1
22fi
23srcdir="@abs_top_srcdir@"
24htmldir="${srcdir}/covhtml"
25export COVFILE="${srcdir}/test.cov"
26gmake -C "${srcdir}" clean
27find "${srcdir}" -type f -name "${COVFILE##*/}" -delete
28rm -rf "${htmldir}"
29cov01 -1
30gmake -C "${srcdir}" $j check || exit 1
31covhtml -d "${srcdir}" -f "${COVFILE}" "${htmldir}"
32cov01 -0
33gmake -C "${srcdir}" clean
Note: See TracBrowser for help on using the repository browser.