From 099bc409764206d7430fccece0ce306d3d9c4921 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Wed, 4 Nov 2020 23:01:08 +0000 Subject: [PATCH] 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 100964e0310d3a2040d0db976f7984d0507b2dbd) Co-authored-by: serge-sans-paille --- Lib/test/test_peg_generator/test_c_parser.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_peg_generator/test_c_parser.py b/Lib/test/test_peg_generator/test_c_parser.py index f9935258c861e0..9701d4f9feb16b 100644 --- a/Lib/test/test_peg_generator/test_c_parser.py +++ b/Lib/test/test_peg_generator/test_c_parser.py @@ -1,3 +1,4 @@ +import sysconfig import textwrap import unittest from distutils.tests.support import TempdirManager @@ -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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy