mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-119727: Add --single-process option to regrtest (#119728)
This commit is contained in:
parent
1d4c2e4a87
commit
4e8aa32245
5 changed files with 46 additions and 12 deletions
|
@ -174,6 +174,7 @@ class Namespace(argparse.Namespace):
|
|||
self.tempdir = None
|
||||
self._add_python_opts = True
|
||||
self.xmlpath = None
|
||||
self.single_process = False
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
@ -307,6 +308,12 @@ def _create_parser():
|
|||
group.add_argument('-j', '--multiprocess', metavar='PROCESSES',
|
||||
dest='use_mp', type=int,
|
||||
help='run PROCESSES processes at once')
|
||||
group.add_argument('--single-process', action='store_true',
|
||||
dest='single_process',
|
||||
help='always run all tests sequentially in '
|
||||
'a single process, ignore -jN option, '
|
||||
'and failed tests are also rerun sequentially '
|
||||
'in the same process')
|
||||
group.add_argument('-T', '--coverage', action='store_true',
|
||||
dest='trace',
|
||||
help='turn on code coverage tracing using the trace '
|
||||
|
@ -435,6 +442,10 @@ def _parse_args(args, **kwargs):
|
|||
else:
|
||||
ns._add_python_opts = False
|
||||
|
||||
# --singleprocess overrides -jN option
|
||||
if ns.single_process:
|
||||
ns.use_mp = None
|
||||
|
||||
# When both --slow-ci and --fast-ci options are present,
|
||||
# --slow-ci has the priority
|
||||
if ns.slow_ci:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue