summaryrefslogtreecommitdiff
path: root/regress-driver
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-06-17 12:30:47 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-06-17 12:30:47 -0400
commitb7aa754e0f83ad0bd60fe74f4a18c7ad7662cc91 (patch)
treebf4695cf896ec5ec8ac0e05181b4929cc8f460ab /regress-driver
parent91f0892c851e7c94a61510a34177a4b1be781f94 (diff)
downloadgpsd-b7aa754e0f83ad0bd60fe74f4a18c7ad7662cc91.tar.gz
Slightly clearer trap statements. All regression tests pass.
Diffstat (limited to 'regress-driver')
-rwxr-xr-xregress-driver3
1 files changed, 2 insertions, 1 deletions
diff --git a/regress-driver b/regress-driver
index e571b108..793d909d 100755
--- a/regress-driver
+++ b/regress-driver
@@ -77,15 +77,16 @@ case $mode in
echo "Testing the $testing..." >&2
errors=0; total=0; notfound=0;
for f in $*; do
- trap 'rm -f ${TMP}/test-$$.chk ${TMP}/testout-$$.chk ${TMP}/testin-$$.chk ${TMP}/diff-$$; exit $errors' EXIT HUP INT TERM
if [ -r $f.chk ]
then
+ trap 'rm -f ${TMP}/test-$$.chk; exit $errors' EXIT HUP INT TERM
case $testing in
daemon) gpsfake -s 38400 -1 -p $opts ${f} | ${GPSFILTER} ${ALTFILTER} >${TMP}/test-$$.chk ;;
clientlib) $GPSD_HOME/libgps -b <${f} >${TMP}/test-$$.chk ;;
esac
if [ "${ALTFILTER}" ]
then
+ trap 'rm -f ${TMP}/test-$$.chk ${TMP}/testout-$$.chk ${TMP}/testin-$$.chk ${TMP}/diff-$$; exit $errors' EXIT HUP INT TERM
sed -n <${f}.chk >${TMP}/testin-$$.chk ${ALTFILTER} -e 'p';
sed -n <${TMP}/test-$$.chk >${TMP}/testout-$$.chk ${ALTFILTER} -e 'p';
diff -ub ${TMP}/testin-$$.chk ${TMP}/testout-$$.chk >${TMP}/diff-$$;