From: robertlipe Date: Wed, 5 Dec 2012 18:58:34 +0000 (+0000) Subject: Exit of testo is number of failures. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~748 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6a452f9fae6d9783daf910e464217a22ac52b80f;p=gpsbabel.git Exit of testo is number of failures. --- diff --git a/gpsbabel/testo b/gpsbabel/testo index bcc77ca8a..5554c247f 100755 --- a/gpsbabel/testo +++ b/gpsbabel/testo @@ -25,12 +25,13 @@ trap "rm -fr $TMPDIR" 0 1 2 3 15 bincompare() { rm -f ${TMPDIR}/bc1 - rm -f ${TMPDIR}/bc2 - ${OD} $1 >${TMPDIR}/bc1 - ${OD} $2 >${TMPDIR}/bc2 - ${DIFF} ${TMPDIR}/bc1 ${TMPDIR}/bc2 || { + rm -f ${TMPDIR}/bc2 + ${OD} $1 >${TMPDIR}/bc1 + ${OD} $2 >${TMPDIR}/bc2 + ${DIFF} ${TMPDIR}/bc1 ${TMPDIR}/bc2 || { echo ERROR binary comparing $* - #exit 1 + let errorcount=errorcout+1 + #exit 1 } } @@ -38,6 +39,7 @@ compare() { ${DIFF} -u -b $* || { echo ERROR comparing $* + let errorcount=errorcout+1 #exit 1 } } @@ -54,6 +56,7 @@ gpsbabel() ${PNAME} $* || { echo "$PNAME returned error $?" echo "($PNAME $*)" + let errorcount=errorcout+1 #exit 1 } } @@ -72,6 +75,8 @@ gpsbabel() # cambridge # cup +let errorcount=0; + if [ $# -ge 1 ]; then while [ $# -ge 1 ]; @@ -81,7 +86,7 @@ then . $t shift; done - exit 0 + exit $errorcount fi for i in testo.d/*.test @@ -90,4 +95,4 @@ do . $i done -exit 0 +exit $errorcount