]> granicus.if.org Git - python/commitdiff
Issue #25188: Clean up code to pass the --pgo flag to subprocesses
authorBrett Cannon <brett@python.org>
Fri, 16 Oct 2015 19:30:20 +0000 (12:30 -0700)
committerBrett Cannon <brett@python.org>
Fri, 16 Oct 2015 19:30:20 +0000 (12:30 -0700)
when running the test suite.

Patch by Arfrever Frehtes Taifersar Arahesis.

Lib/test/regrtest.py

index 5c046ea52e091d2a5c8579fb92f482d558fe0f07..a51387e93cea3c8726321f2e793f1fb0db6035a6 100755 (executable)
@@ -508,7 +508,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
             for test in tests:
                 args_tuple = (
                     (test, verbose, quiet),
-                    dict(huntrleaks=huntrleaks, use_resources=use_resources)
+                    dict(huntrleaks=huntrleaks, use_resources=use_resources,
+                         pgo=pgo)
                 )
                 yield (test, args_tuple)
         pending = tests_and_args()
@@ -526,9 +527,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
                     except StopIteration:
                         output.put((None, None, None, None))
                         return
-                    # required to permit running tests with PGO flag on/off
-                    if pgo:
-                        args_tuple[1]['pgo']=pgo
                     # -E is needed by some tests, e.g. test_import
                     popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)],
                                    stdout=PIPE, stderr=PIPE,