summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest/cmdline.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2015-10-02 23:20:49 (GMT)
committerBrett Cannon <brett@python.org>2015-10-02 23:20:49 (GMT)
commit11faa218438bebc56a6ea1db405b19ed5b554aa0 (patch)
treefbd49775bdbcda50090b33ed975c4ba8578ec35f /Lib/test/libregrtest/cmdline.py
parent5f9d3acc5e8050a43c79cf4d2a373be67f3c27fc (diff)
parentbe7c1638e2bc837125efc18b7e9853caa7dc95bf (diff)
downloadcpython-11faa218438bebc56a6ea1db405b19ed5b554aa0.zip
cpython-11faa218438bebc56a6ea1db405b19ed5b554aa0.tar.gz
cpython-11faa218438bebc56a6ea1db405b19ed5b554aa0.tar.bz2
Merge from 3.5 for issue #25188.
Diffstat (limited to 'Lib/test/libregrtest/cmdline.py')
-rw-r--r--Lib/test/libregrtest/cmdline.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/cmdline.py b/Lib/test/libregrtest/cmdline.py
index ae1aeb9..6b18b3a 100644
--- a/Lib/test/libregrtest/cmdline.py
+++ b/Lib/test/libregrtest/cmdline.py
@@ -236,6 +236,8 @@ def _create_parser():
group.add_argument('--list-tests', action='store_true',
help="only write the name of tests that will be run, "
"don't execute them")
+ group.add_argument('-P', '--pgo', dest='pgo', action='store_true',
+ help='enable Profile Guided Optimization training')
parser.add_argument('args', nargs=argparse.REMAINDER,
help=argparse.SUPPRESS)
@@ -279,7 +281,7 @@ def _parse_args(args, **kwargs):
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, failfast=False, match_tests=None)
+ header=False, failfast=False, match_tests=None, pgo=False)
for k, v in kwargs.items():
if not hasattr(ns, k):
raise TypeError('%r is an invalid keyword argument '
@@ -299,6 +301,8 @@ def _parse_args(args, **kwargs):
parser.error("-l and -j don't go together!")
if ns.failfast and not (ns.verbose or ns.verbose3):
parser.error("-G/--failfast needs either -v or -W")
+ if ns.pgo and (ns.verbose or ns.verbose2 or ns.verbose3):
+ parser.error("--pgo/-v don't go together!")
if ns.quiet:
ns.verbose = 0