summaryrefslogtreecommitdiff
path: root/regress-driver
diff options
context:
space:
mode:
Diffstat (limited to 'regress-driver')
-rwxr-xr-xregress-driver22
1 files changed, 14 insertions, 8 deletions
diff --git a/regress-driver b/regress-driver
index 16defd72..7ce6131e 100755
--- a/regress-driver
+++ b/regress-driver
@@ -12,20 +12,26 @@ case $1 in
shift
echo "Testing the daemon..."
mkdir -p test
- errors=0; total=0;
+ errors=0; total=0; notfound=0;
for f in $*; do
dir=`dirname $f`
- gpsfake -s 38400 -1 -b -p ${f} | grep -v "^GPSD,X" >$dir/test.chk;
- if diff -ub ${f}.chk $dir/test.chk; then :; else
- errors=`expr $errors + 1`;
- fi;
- total=`expr $total + 1`;
+ if [ -r $f.chk ]
+ then
+ gpsfake -s 38400 -1 -b -p ${f} | grep -v "^GPSD,X" >$dir/test.chk;
+ if diff -ub ${f}.chk $dir/test.chk; then :; else
+ errors=`expr $errors + 1`;
+ fi;
+ else
+ echo "*** No check log $f.chk exists"
+ notfound=`expr $notfound + 1`;
+ fi
+ total=`expr $total + 1`;
done; rm $dir/test.chk;
if test $errors -gt 0; then
- echo "Regression test FAILED: $errors errors in $total tests total.";
+ echo "Regression test FAILED: $errors errors in $total tests total ($notfound not found).";
exit 1;
else
- echo "Regression test successful: no errors in $total tests.";
+ echo "Regression test successful: no errors in $total tests ($notfound not found).";
exit 0;
fi
;;