summaryrefslogtreecommitdiff
path: root/Lib/test/libregrtest/cmdline.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-13 10:55:07 -0700
committerGitHub <noreply@github.com>2019-05-13 10:55:07 -0700
commit19464bcd97436cd8d5d9e32b70faf3e1e5f2a712 (patch)
tree2e89be6957f664faddf0d8107519ce18a1bc6f62 /Lib/test/libregrtest/cmdline.py
parent68a11b6e6a73cd2e9b49e5df9973877b2fed6277 (diff)
downloadcpython-git-19464bcd97436cd8d5d9e32b70faf3e1e5f2a712.tar.gz
bpo-36719: regrtest -jN no longer stops on crash (GH-13231)
"python3 -m test -jN ..." now continues the execution of next tests when a worker process crash (CHILD_ERROR state). Previously, the test suite stopped immediately. Use --failfast to stop at the first error. Moreover, --forever now also implies --failfast. (cherry picked from commit b0917df329ba14b7bc6fa782c1b61e7a2163af0b) Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'Lib/test/libregrtest/cmdline.py')
-rw-r--r--Lib/test/libregrtest/cmdline.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/cmdline.py b/Lib/test/libregrtest/cmdline.py
index cb09ee0e03..dc0d880719 100644
--- a/Lib/test/libregrtest/cmdline.py
+++ b/Lib/test/libregrtest/cmdline.py
@@ -256,7 +256,7 @@ def _create_parser():
help='suppress error message boxes on Windows')
group.add_argument('-F', '--forever', action='store_true',
help='run the specified tests in a loop, until an '
- 'error happens')
+ 'error happens; imply --failfast')
group.add_argument('--list-tests', action='store_true',
help="only write the name of tests that will be run, "
"don't execute them")
@@ -389,5 +389,8 @@ def _parse_args(args, **kwargs):
with open(ns.match_filename) as fp:
for line in fp:
ns.match_tests.append(line.strip())
+ if ns.forever:
+ # --forever implies --failfast
+ ns.failfast = True
return ns