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

Skip to content

Commit 6de4574

Browse files
authored
bpo-37023: Skip test_gdb under PGO (GH-13555)
1 parent 14738ff commit 6de4574

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/test/test_gdb.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def get_gdb_version():
5252
raise unittest.SkipTest("test_gdb doesn't work correctly when python is"
5353
" built with LLVM clang")
5454

55+
if ((sysconfig.get_config_var('PGO_PROF_USE_FLAG') or 'xxx') in
56+
(sysconfig.get_config_var('PY_CORE_CFLAGS') or '')):
57+
raise unittest.SkipTest("test_gdb is not reliable on PGO builds")
58+
5559
# Location of custom hooks file in a repository checkout.
5660
checkout_hook_path = os.path.join(os.path.dirname(sys.executable),
5761
'python-gdb.py')
@@ -272,7 +276,7 @@ def get_gdb_repr(self, source,
272276
# gdb can insert additional '\n' and space characters in various places
273277
# in its output, depending on the width of the terminal it's connected
274278
# to (using its "wrap_here" function)
275-
m = re.match(r'.*#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)\)\s+at\s+\S*Python/bltinmodule.c.*',
279+
m = re.match(r'.*#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)?\)\s+at\s+\S*Python/bltinmodule.c.*',
276280
gdb_output, re.DOTALL)
277281
if not m:
278282
self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output))

0 commit comments

Comments
 (0)