From df407cbf73c86540f99cc8e8f6a7bb25a4b3df45 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 17 Jun 2010 11:38:15 -0400 Subject: 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. --- regress-driver | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'regress-driver') 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`; -- cgit v1.2.1