skip two test_gdb tests that fail when compiled in profile-opt mode:
StackNavigationTests.test_up_at_top and PyBtTests.test_threads.
Unfortunately we have no way of identifying if we were compiled profile-opt
or not from what is in sysconfig.get_config_vars() so we just disable it for
all optimized builds. This test suite crazy fragile.
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index 8d3d772..313af2b 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -717,6 +717,8 @@
'Unable to find a newer python frame\n')
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
+ @unittest.skipIf(python_is_optimized(),
+ "Python was compiled with optimizations")
def test_up_at_top(self):
'Verify handling of "py-up" at the top of the stack'
bt = self.get_stack_trace(script=self.get_sample_script(),
@@ -777,6 +779,8 @@
@unittest.skipUnless(thread,
"Python was compiled without thread support")
+ @unittest.skipIf(python_is_optimized(),
+ "Python was compiled with optimizations")
def test_threads(self):
'Verify that "py-bt" indicates threads that are waiting for the GIL'
cmd = '''