diff options
| author | Vince Harron <vharron@google.com> | 2015-01-08 02:11:26 +0000 |
|---|---|---|
| committer | Vince Harron <vharron@google.com> | 2015-01-08 02:11:26 +0000 |
| commit | ede5965b2a890aba47a8bc885c5b43a8ce593770 (patch) | |
| tree | 15df26a591f419f110f577e2c7f09dcd50253da9 | |
| parent | 2561bb8831a1ba4b48ebcc6d8d325000fadaccc0 (diff) | |
| download | bcm5719-llvm-ede5965b2a890aba47a8bc885c5b43a8ce593770.tar.gz bcm5719-llvm-ede5965b2a890aba47a8bc885c5b43a8ce593770.zip | |
Added documentation for test timeout
Differential Revision: http://reviews.llvm.org/D6669
Submitted for Chaoren Lin
llvm-svn: 225425
| -rwxr-xr-x | lldb/test/dosep.py | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/lldb/test/dosep.py b/lldb/test/dosep.py index c7e2b8c7d08..fc4b8ff074e 100755 --- a/lldb/test/dosep.py +++ b/lldb/test/dosep.py @@ -2,6 +2,23 @@ """ Run the test suite using a separate process for each test file. + +Each test will run with a time limit of 5 minutes by default. + +Override the default time limit of 5 minutes by setting +the environment variable LLDB_TEST_TIMEOUT. + +E.g., export LLDB_TEST_TIMEOUT=10m + +Override the time limit for individual tests by setting +the environment variable LLDB_[TEST NAME]_TIMEOUT. + +E.g., export LLDB_TESTCONCURRENTEVENTS_TIMEOUT=2m + +Set to "0" to run without time limit. + +E.g., export LLDB_TEST_TIMEOUT=0 +or export LLDB_TESTCONCURRENTEVENTS_TIMEOUT=0 """ import multiprocessing @@ -14,6 +31,7 @@ import sys from optparse import OptionParser def get_timeout_command(): + """Search for a suitable timeout command.""" if sys.platform.startswith("win32"): return None try: @@ -36,13 +54,8 @@ default_timeout = os.getenv("LLDB_TEST_TIMEOUT") or "5m" eTimedOut, ePassed, eFailed = 124, 0, 1 def call_with_timeout(command, timeout): - """Each test will timeout after 5 minutes by default. - Override the default timeout of 5 minutes with LLDB_TEST_TIMEOUT. - E.g., LLDB_TEST_TIMEOUT=10m - Override the timeout for individual tests with LLDB_[TEST NAME]_TIMEOUT. - E.g., LLDB_TESTCONCURRENTEVENTS_TIMEOUT=2m - Set to "0" to run without timeout.""" - if timeout_command: + """Run command with a timeout if possible.""" + if timeout_command and timeout != "0": return subprocess.call([timeout_command, timeout] + command, stdin=subprocess.PIPE) return (ePassed if subprocess.call(command, stdin=subprocess.PIPE) == 0 @@ -132,6 +145,23 @@ def main(): parser = OptionParser(usage="""\ Run lldb test suite using a separate process for each test file. + + Each test will run with a time limit of 5 minutes by default. + + Override the default time limit of 5 minutes by setting + the environment variable LLDB_TEST_TIMEOUT. + + E.g., export LLDB_TEST_TIMEOUT=10m + + Override the time limit for individual tests by setting + the environment variable LLDB_[TEST NAME]_TIMEOUT. + + E.g., export LLDB_TESTCONCURRENTEVENTS_TIMEOUT=2m + + Set to "0" to run without time limit. + + E.g., export LLDB_TEST_TIMEOUT=0 + or export LLDB_TESTCONCURRENTEVENTS_TIMEOUT=0 """) parser.add_option('-o', '--options', type='string', action='store', |

