mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
./run: Increase default timeout from 1h -> 4h.
1 hour was not long enough for the C API tests when run in Koji.
This update commit caab9f1e6f.
This commit is contained in:
10
run.in
10
run.in
@@ -222,11 +222,15 @@ fi
|
||||
# - print how long it takes to run the test
|
||||
# - timeout if the test takes too long to run
|
||||
|
||||
# Originally 1h, but that is not long enough to run the C API
|
||||
# tests on Koji.
|
||||
timeout_period=4h
|
||||
|
||||
# Do we have Padraig's timeout utility (from coreutils)?
|
||||
if timeout --help >/dev/null 2>&1; then
|
||||
# Timeout (SIGTERM) after 1 hour.
|
||||
# Timeout (SIGTERM) after $timeout_period.
|
||||
# Then send a second SIGKILL 30 seconds later.
|
||||
timeout="timeout -k 30s 1h"
|
||||
timeout="timeout -k 30s $timeout_period"
|
||||
fi
|
||||
|
||||
pid=$$
|
||||
@@ -246,7 +250,7 @@ elif [ "$fail" -eq 124 ]; then
|
||||
# Timed out.
|
||||
echo "$b/run --test" "$@"
|
||||
cat $tmpout
|
||||
echo "$b/run: command timed out after 1 hour"
|
||||
echo "$b/run: command timed out after $timeout_period"
|
||||
else
|
||||
# Test failed.
|
||||
echo "$b/run --test" "$@"
|
||||
|
||||
Reference in New Issue
Block a user