psss / rpms / libguestfs

Forked from rpms/libguestfs 5 years ago
Clone
Blob Blame History Raw
From a7b9d61cde63020686afe769ca8265a01fce208f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 11 Jul 2013 21:05:56 +0100
Subject: [PATCH] ./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 caab9f1e6f7ac0d8d5209c31854d640b807519ce.
---
 run.in | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/run.in b/run.in
index d8b2e03..e132055 100755
--- a/run.in
+++ b/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" "$@"
-- 
1.8.3.1