mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[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 64cd6fc9a6
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
e7c774996a
commit
6a4c06bcb3
2 changed files with 2 additions and 3 deletions
|
@ -509,6 +509,7 @@ def collect_sysconfig(info_add):
|
|||
'MACHDEP',
|
||||
'MULTIARCH',
|
||||
'OPT',
|
||||
'PGO_PROF_USE_FLAG',
|
||||
'PY_CFLAGS',
|
||||
'PY_CFLAGS_NODIST',
|
||||
'PY_CORE_LDFLAGS',
|
||||
|
|
|
@ -13,9 +13,7 @@ from test import support
|
|||
from test.support import os_helper, import_helper
|
||||
from test.support.script_helper import assert_python_ok
|
||||
|
||||
_py_cflags_nodist = sysconfig.get_config_var("PY_CFLAGS_NODIST")
|
||||
_pgo_flag = sysconfig.get_config_var("PGO_PROF_USE_FLAG")
|
||||
if _pgo_flag and _py_cflags_nodist and _pgo_flag in _py_cflags_nodist:
|
||||
if support.check_cflags_pgo():
|
||||
raise unittest.SkipTest("peg_generator test disabled under PGO build")
|
||||
|
||||
test_tools.skip_if_missing("peg_generator")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue