From 889412ec4068a95242e05940f406fbed305a3b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 29 Dec 2014 17:04:30 +0000 Subject: [PATCH] Accept a -jN argument which we pass on to gmake. Delete all coverage files, not just the root one. Exit if the tests fail so we can inspect the result. --- tools/coverage.sh.in | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/coverage.sh.in b/tools/coverage.sh.in index c415640..b7cbb73 100755 --- a/tools/coverage.sh.in +++ b/tools/coverage.sh.in @@ -1,10 +1,26 @@ #!/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 + srcdir="@abs_top_srcdir@" export COVFILE="${srcdir}/test.cov" gmake -C "${srcdir}" clean -rm "${COVFILE}" +find "${srcdir}" -type f -name "${COVFILE##*/}" -delete cov01 -1 -gmake -C "${srcdir}" check +gmake -C "${srcdir}" $j check || exit 1 cov01 -0 gmake -C "${srcdir}" clean