Commit f6643459 authored by Brian Curtin's avatar Brian Curtin

Implement #11832. Add an option to start regrtest and wait for input

before continuing.

This is useful for starting up the test suite to attach a debugger such
as Visual Studio or others.
parent 5aefa663
...@@ -24,6 +24,7 @@ Options: ...@@ -24,6 +24,7 @@ Options:
-- dump the traceback and exit if a test takes more -- dump the traceback and exit if a test takes more
than TIMEOUT seconds (default: 30 minutes); disable than TIMEOUT seconds (default: 30 minutes); disable
the timeout if TIMEOUT is zero the timeout if TIMEOUT is zero
--wait -- wait for user input, e.g., allow a debugger to be attached
Verbosity Verbosity
...@@ -279,7 +280,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -279,7 +280,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
'use=', 'threshold=', 'trace', 'coverdir=', 'nocoverdir', 'use=', 'threshold=', 'trace', 'coverdir=', 'nocoverdir',
'runleaks', 'huntrleaks=', 'memlimit=', 'randseed=', 'runleaks', 'huntrleaks=', 'memlimit=', 'randseed=',
'multiprocess=', 'coverage', 'slaveargs=', 'forever', 'debug', 'multiprocess=', 'coverage', 'slaveargs=', 'forever', 'debug',
'start=', 'nowindows', 'header', 'testdir=', 'timeout=']) 'start=', 'nowindows', 'header', 'testdir=', 'timeout=', 'wait'])
except getopt.error as msg: except getopt.error as msg:
usage(msg) usage(msg)
...@@ -419,6 +420,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, ...@@ -419,6 +420,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
"faulthandler.dump_tracebacks_later", file=sys.stderr) "faulthandler.dump_tracebacks_later", file=sys.stderr)
sys.exit(1) sys.exit(1)
timeout = float(a) timeout = float(a)
elif o == '--wait':
input("Press any key to continue...")
else: else:
print(("No handler for option {}. Please report this as a bug " print(("No handler for option {}. Please report this as a bug "
"at http://bugs.python.org.").format(o), file=sys.stderr) "at http://bugs.python.org.").format(o), file=sys.stderr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment