Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a4c06b

Browse files
[3.12] gh-117889: Fix PGO test in test_peg_generator (GH-117893) (#117895)
Reuse support.check_cflags_pgo() in test_peg_generator to check for PGO build. Log PGO_PROF_USE_FLAG in test.pythoninfo. (cherry picked from commit 64cd6fc) Co-authored-by: Victor Stinner <[email protected]>
1 parent e7c7749 commit 6a4c06b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Lib/test/pythoninfo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ def collect_sysconfig(info_add):
509509
'MACHDEP',
510510
'MULTIARCH',
511511
'OPT',
512+
'PGO_PROF_USE_FLAG',
512513
'PY_CFLAGS',
513514
'PY_CFLAGS_NODIST',
514515
'PY_CORE_LDFLAGS',

Lib/test/test_peg_generator/test_c_parser.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
from test.support import os_helper, import_helper
1414
from test.support.script_helper import assert_python_ok
1515

16-
_py_cflags_nodist = sysconfig.get_config_var("PY_CFLAGS_NODIST")
17-
_pgo_flag = sysconfig.get_config_var("PGO_PROF_USE_FLAG")
18-
if _pgo_flag and _py_cflags_nodist and _pgo_flag in _py_cflags_nodist:
16+
if support.check_cflags_pgo():
1917
raise unittest.SkipTest("peg_generator test disabled under PGO build")
2018

2119
test_tools.skip_if_missing("peg_generator")

0 commit comments

Comments
 (0)