summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-06-06 10:14:23 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-06-06 10:14:23 (GMT)
commit883456833c897ae24a7fb0ac0ff61adfde3531c2 (patch)
tree6d746df7ae75750fa8b3be469286bf99447c1234 /Lib/test/regrtest.py
parent9e586c2b3521188eece23432f2a39e8f728a68af (diff)
downloadcpython-883456833c897ae24a7fb0ac0ff61adfde3531c2.zip
cpython-883456833c897ae24a7fb0ac0ff61adfde3531c2.tar.gz
cpython-883456833c897ae24a7fb0ac0ff61adfde3531c2.tar.bz2
Issue #12250: regrtest --timeout displays a warning instead of failing with an
error if faulthandler.dump_tracebacks_later() is missing (e.g. if Python is compiled without threads).
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 529734a..968b59d 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -415,12 +415,13 @@ 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("The timeout option requires "
- "faulthandler.dump_tracebacks_later", file=sys.stderr)
- sys.exit(1)
- timeout = float(a)
- if timeout <= 0:
+ if hasattr(faulthandler, 'dump_tracebacks_later'):
+ timeout = float(a)
+ if timeout <= 0:
+ timeout = None
+ else:
+ print("Warning: The timeout option requires "
+ "faulthandler.dump_tracebacks_later")
timeout = None
elif o == '--wait':
input("Press any key to continue...")