tests/run.sh: Show awesome's exit code

When awesome exits with a non-zero code, this is something interesting that we
should log. Do so.

The "set +e" / "set -e" dance is required so that we do not abort because the
wait builtin returns a non-zero code.

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

View File

@ -219,6 +219,12 @@ for f in $tests; do
# Tail the log and quit, when awesome quits.
tail -n 100000 -f --pid $awesome_pid $awesome_log
set +e
wait $awesome_pid
code=$?
set -e
[ "$code" != 0 ] && echo "Awesome exited with status code $code"
if ! grep -q -E '^Test finished successfully$' $awesome_log ||
grep -q -E '[Ee]rror|assertion failed' $awesome_log; then
echo "===> ERROR running $f! <==="