diff --git a/tests/run.sh b/tests/run.sh index 009c859b3..7ee2aed80 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -182,7 +182,8 @@ fi start_awesome() { export DISPLAY="$D" cd $build_dir - DISPLAY="$D" "$AWESOME" -c "$RC_FILE" $AWESOME_OPTIONS > $awesome_log 2>&1 & + # Kill awesome after $timeout_stale seconds (e.g. for errors during test setup). + DISPLAY="$D" timeout $timeout_stale "$AWESOME" -c "$RC_FILE" $AWESOME_OPTIONS > $awesome_log 2>&1 & awesome_pid=$! cd - >/dev/null @@ -209,13 +210,6 @@ for f in $tests; do # Send the test file to awesome. cat $f | DISPLAY=$D "$AWESOME_CLIENT" 2>&1 - # Kill awesome after 1 minute (e.g. with errors during test setup). - (sleep $timeout_stale - if [ "$(ps -o comm= $awesome_pid)" = "${AWESOME##*/}" ]; then - echo "Killing (stale?!) awesome (PID $awesome_pid) after $timeout_stale seconds." - kill $awesome_pid - fi) & - # Tail the log and quit, when awesome quits. tail -n 100000 -f --pid $awesome_pid $awesome_log