From a430ac1e233b54e12b37894e0a9a0c449ed5de43 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 25 Sep 2016 06:00:15 +0200 Subject: [PATCH] tests/run.sh: Print special message for timeout The timeout utility guarantees an exit code of 124 when the process died due to timeout. Since awesome only ever exits with 0 or 1, we can use this to reliably detect timeouts and print a matching message. Signed-off-by: Uli Schlachter --- tests/run.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/run.sh b/tests/run.sh index 7ee2aed80..7ceb3c57f 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -217,7 +217,11 @@ for f in $tests; do wait $awesome_pid code=$? set -e - [ "$code" != 0 ] && echo "Awesome exited with status code $code" + case $code in + 0) ;; + 124) echo "Awesome was killed due to timeout after $timeout_stale seconds" ;; + *) echo "Awesome exited with status code $code" ;; + esac if ! grep -q -E '^Test finished successfully$' $awesome_log || grep -q -E '[Ee]rror|assertion failed' $awesome_log; then