From 62d0961994e775014f8072fd112d2b5a5b34de10 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 24 Sep 2016 15:55:24 +0200 Subject: [PATCH] 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 --- tests/run.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/run.sh b/tests/run.sh index 697723404..009c859b3 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -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! <==="