Only setup PGO tests when --pgo is enabled. (GH-14927) · python/cpython@f0807ab

‎Lib/test/libregrtest/main.py‎

Lines changed: 3 additions & 2 deletions

Original file line numberDiff line numberDiff line change

@@ -215,8 +215,9 @@ def find_tests(self, tests):

215215
216216

removepy(self.tests)

217217
218-

# add default PGO tests if no tests are specified

219-

setup_pgo_tests(self.ns)

218+

if self.ns.pgo:

219+

# add default PGO tests if no tests are specified

220+

setup_pgo_tests(self.ns)

220221
221222

stdtests = STDTESTS[:]

222223

nottests = NOTTESTS.copy()