summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-06-29 14:16:51 +0000
committerPavel Labath <labath@google.com>2015-06-29 14:16:51 +0000
commitfad30cf194cd642b3561c31c9160aa25d25a096d (patch)
tree49f68e5e9ef790a28708d0127fd7e9d53cb1882e
parentf87b05e43bdbb2250b4eab573ed1b7b168a50a41 (diff)
downloadbcm5719-llvm-fad30cf194cd642b3561c31c9160aa25d25a096d.tar.gz
bcm5719-llvm-fad30cf194cd642b3561c31c9160aa25d25a096d.zip
dosep.py: Add ability to set default test timout based on target
Summary: Current default is 10 minutes, which causes the test suite to run very long in case of test timeouts. On local linux, each test completes in under 90 seconds in the slowest configuration (debug build of lldb, using debug clang to build inferiors). I am changing the default to 4m on local targets, while retaining the 10m timeout for remote ones. Reviewers: sivachandra, vharron Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10527 llvm-svn: 240946
-rwxr-xr-xlldb/test/dosep.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/lldb/test/dosep.py b/lldb/test/dosep.py
index 27716c9f7c4..2a2ff82c0b5 100755
--- a/lldb/test/dosep.py
+++ b/lldb/test/dosep.py
@@ -61,8 +61,6 @@ def get_timeout_command():
timeout_command = get_timeout_command()
-default_timeout = os.getenv("LLDB_TEST_TIMEOUT") or "10m"
-
# Status codes for running command with timeout.
eTimedOut, ePassed, eFailed = 124, 0, 1
@@ -272,6 +270,19 @@ def getExpectedTimeouts(platform_name):
}
return expected_timeout
+def getDefaultTimeout(platform_name):
+ if os.getenv("LLDB_TEST_TIMEOUT"):
+ return os.getenv("LLDB_TEST_TIMEOUT")
+
+ if platform_name is None:
+ platform_name = sys.platform
+
+ if platform_name.startswith("remote-"):
+ return "10m"
+ else:
+ return "4m"
+
+
def touch(fname, times=None):
with open(fname, 'a'):
os.utime(fname, times)
@@ -361,6 +372,9 @@ Run lldb test suite using a separate process for each test file.
if num_threads < 1:
num_threads = 1
+ global default_timeout
+ default_timeout = getDefaultTimeout(dotest_options.lldb_platform_name)
+
system_info = " ".join(platform.uname())
(timed_out, failed, passed, all_fails, all_passes) = walk_and_invoke(test_directory, test_subdir, dotest_argv, num_threads)
OpenPOWER on IntegriCloud