https://github.com/python/cpython/commit/6a4c06bcb341628d720ea5b2d0cb5500db8b7694 commit: 6a4c06bcb341628d720ea5b2d0cb5500db8b7694 branch: 3.12 author: Miss Islington (bot) <[email protected]> committer: erlend-aasland <[email protected]> date: 2024-04-15T14:15:30Z summary:
[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 64cd6fc9a6a3c3c19091a1c81cbbe8994583017d) Co-authored-by: Victor Stinner <[email protected]> files: M Lib/test/pythoninfo.py M Lib/test/test_peg_generator/test_c_parser.py diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 74ebb5e5b8a292..6efeaad8126db3 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -509,6 +509,7 @@ def collect_sysconfig(info_add): 'MACHDEP', 'MULTIARCH', 'OPT', + 'PGO_PROF_USE_FLAG', 'PY_CFLAGS', 'PY_CFLAGS_NODIST', 'PY_CORE_LDFLAGS', diff --git a/Lib/test/test_peg_generator/test_c_parser.py b/Lib/test/test_peg_generator/test_c_parser.py index f9105a9f23bd6d..eb31569c0307ed 100644 --- a/Lib/test/test_peg_generator/test_c_parser.py +++ b/Lib/test/test_peg_generator/test_c_parser.py @@ -13,9 +13,7 @@ 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") _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
