diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-13 07:25:48 +0800 |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2011-04-13 07:25:48 +0800 |
commit | 5809403e6d83be3649cc9453450ef48aaa425ab1 (patch) | |
tree | da475170a727ec7d73cd54c6ebabde25c349b666 | |
parent | 1cea9a0227213d1ad914e1d6ce69acf5792756f5 (diff) | |
parent | 9bf133ca314613af56c115297c2336b04d0d473a (diff) | |
download | cpython-git-5809403e6d83be3649cc9453450ef48aaa425ab1.tar.gz |
merge the change update.
-rwxr-xr-x | Lib/test/regrtest.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index a76492a0f9..dca0b4e86b 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -240,7 +240,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, random_seed=None, use_mp=None, verbose3=False, forever=False, - header=False, timeout=60*60): + header=False): """Execute a test suite. This also parses command-line options and modifies its behavior @@ -263,6 +263,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, directly to set the values that would normally be set by flags on the command line. """ + if hasattr(faulthandler, 'dump_tracebacks_later'): + timeout = 60*60 + else: + timeout = None replace_stdout() @@ -409,6 +413,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, # join it with the saved CWD so it ends up where the user expects. testdir = os.path.join(support.SAVEDCWD, a) elif o == '--timeout': + if not hasattr(faulthandler, 'dump_tracebacks_later'): + print("--timeout option requires " + "faulthandler.dump_tracebacks_later", file=sys.stderr) + sys.exit(1) timeout = float(a) else: print(("No handler for option {}. Please report this as a bug " |