Fix tests/run.sh

Commit a944636c02 "bashified" tests/run.sh for some reason.
Afterwards, commit 4abd820051 fixed some of the fall-out.
However, there is still a problem left.

We have "set -e" in this script. Thus, whenever some command exits with
status 0, the script abort. When the variable errors is zero/unset, the
command "((errors++))" has exit status zero. Thus, this instruction
caused the shell script to abort. This was not intended.

Fix this by using "((++errors))" instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-01-01 14:51:39 +01:00
parent 6534208f62
commit f7025e2f73
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ for f in $tests; do
grep -q -E '[Ee]rror|assertion failed' "$awesome_log"; then grep -q -E '[Ee]rror|assertion failed' "$awesome_log"; then
echo "===> ERROR running $f <===" echo "===> ERROR running $f <==="
grep --color -o --binary-files=text -E '.*[Ee]rror.*|.*assertion failed.*' "$awesome_log" || true grep --color -o --binary-files=text -E '.*[Ee]rror.*|.*assertion failed.*' "$awesome_log" || true
((errors++)) ((++errors))
fi fi
done done