8000 [3.9] bpo-42207 :Disable peg generator tests when building with PGO (GH-23141) by miss-islington · Pull Request #23155 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.9] bpo-42207 :Disable peg generator tests when building with PGO (GH-23141) #23155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
EABE
Diff view
Disable peg generator tests when building with PGO (GH-23141)
Otherwise, when running the testsuite, test_peg_generator tries to compile C
code using the optimized flags and fails because it cannot find the profile
data.
(cherry picked from commit 100964e)

Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
  • Loading branch information
serge-sans-paille authored and miss-islington committed Nov 4, 2020
commit 099bc409764206d7430fccece0ce306d3d9c4921
6 changes: 6 additions & 0 deletions Lib/test/test_peg_generator/test_c_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sysconfig
import textwrap
import unittest
from distutils.tests.support import TempdirManager
Expand All @@ -7,6 +8,11 @@
from test import support
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:
raise unittest.SkipTest("peg_generator test disabled under PGO build")

test_tools.skip_if_missing("peg_generator")
with test_tools.imports_under_tool("peg_generator"):
from pegen.grammar_parser import GeneratedParser as GrammarParser
Expand Down
0