From 95fd0f8d664bea546b9c063b886a0cee96a50955 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 29 Aug 2017 17:12:36 +0200 Subject: [PATCH] handle non-existing 'timeout' on MacOS --- testme.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testme.sh b/testme.sh index a65e2f8..ee2e87c 100755 --- a/testme.sh +++ b/testme.sh @@ -78,7 +78,9 @@ _runtest() exit 128 fi echo -e "\rRun test $1 $2" - timeout --foreground 90 ./test > test_${suffix}.txt || _die "running tests" $? + local _timeout="" + which timeout >/dev/null && _timeout="timeout --foreground 90" + $_timeout ./test > test_${suffix}.txt || _die "running tests" $? } _banner()