tests/run.sh: Don't fail because of grep

This script runs under "set -e", so any command exiting with a non-zero status
makes it abort. However, we do not care about failures from grep to find
anything, so handle that case gracefully.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-09-24 15:53:35 +02:00
parent c7f5a9acd3
commit 86ee5bb750
1 changed files with 1 additions and 1 deletions

View File

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