1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Regression test suite: bugfix: accurately report number of errors

The number of errors in each tests/*.sh test set is reported using
its exit code (up to 125). The main test script saves this code in
$e to report the number of errors. But if a set had errors, $e was
then erroneously overwritten before reporting the number of errors,
so it was always 1.

src/cmd/ksh93/tests/shtests:
- Don't overwrite $e with the exit code of ((e == 0)).

(cherry picked from commit b9ab95488b23167316f5b21f338368c9490ebc50)
This commit is contained in:
Martijn Dekker 2020-05-17 10:11:06 +01:00
parent 75fc493e7d
commit d10eab988a

View file

@ -347,8 +347,7 @@ do if [[ ! -r $i ]]
fi
if (( e == 0 ))
then echo test $o passed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} "[ $t $T 0 ${E}s ]"
else e=$?
if (( e != 1 ))
else if (( e != 1 ))
then E=${E}s
fi
echo test $o failed ${time:+"at $(date +%Y-%m-%d+%H:%M:%S)"} with exit code $e "[ $t $T $e $E ]"