diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-06-17 11:38:15 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-06-17 11:38:15 -0400 |
commit | df407cbf73c86540f99cc8e8f6a7bb25a4b3df45 (patch) | |
tree | 39fd7ffea5281a060d19de34306d8ba761d3d6fc /regress-driver | |
parent | 41cf02f5e4d7e74a121964fbd2ba00ee4aed2b3f (diff) | |
download | gpsd-df407cbf73c86540f99cc8e8f6a7bb25a4b3df45.tar.gz |
Remove a kluge in the regression-test driver.
With the multipacket bug gone, it's no longer necessary to compare
versions of the test log and check log with the last line trimmed off.
All regression tests pass. Code splints and cppcheclks clean.
Diffstat (limited to 'regress-driver')
-rwxr-xr-x | regress-driver | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/regress-driver b/regress-driver index 8fdd4d44..5144393d 100755 --- a/regress-driver +++ b/regress-driver @@ -77,7 +77,7 @@ 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}/test-whole-$$.chk ${TMP}/test-trunc-$$.chk ${TMP}/log-copy-$$.chk ${TMP}/diff-$$ ${TMP}/diff-$$-trunc; exit $errors' EXIT HUP INT TERM + trap 'rm -f ${TMP}/test-$$.chk ${TMP}/test-whole-$$.chk ${TMP}/log-copy-$$.chk ${TMP}/diff-$$; exit $errors' EXIT HUP INT TERM if [ -r $f.chk ] then case $testing in @@ -86,14 +86,12 @@ case $mode in esac sed -n <${f}.chk >${TMP}/log-copy-$$.chk ${ALTFILTER} -e 'p'; sed -n <${TMP}/test-$$.chk >${TMP}/test-whole-$$.chk ${ALTFILTER} -e 'p'; - sed -n <${TMP}/test-$$.chk >${TMP}/test-trunc-$$.chk -e '$d' ${ALTFILTER} -e 'p'; diff -ub ${TMP}/log-copy-$$.chk ${TMP}/test-whole-$$.chk >${TMP}/diff-$$; - diff -ub ${TMP}/log-copy-$$.chk ${TMP}/test-trunc-$$.chk >${TMP}/diff-$$-trunc; - if test \( -s ${TMP}/diff-$$ \) -a \( -s ${TMP}/diff-$$-trunc \) ; then + if test -s ${TMP}/diff-$$ ; then errors=`expr $errors + 1`; cat ${TMP}/diff-$$ fi; - rm -f ${TMP}/test-$$.chk ${TMP}/test-whole-$$.chk ${TMP}/test-trunc-$$.chk ${TMP}/log-copy-$$.chk ${TMP}/diff-$$ ${TMP}/diff-$$-trunc + rm -f ${TMP}/test-$$.chk ${TMP}/test-whole-$$.chk ${TMP}/log-copy-$$.chk ${TMP}/diff-$$ else echo "*** No check log $f.chk exists" notfound=`expr $notfound + 1`; |