handle non-existing 'timeout' on MacOS

This commit is contained in:
Steffen Jaeckel 2017-08-29 17:12:36 +02:00
parent 465933ebf8
commit 95fd0f8d66
1 changed files with 3 additions and 1 deletions

View File

@ -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()