From: Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) Date: Thu, 8 Sep 2016 21:51:26 +0000 (+0000) Subject: skip two test_gdb tests that fail when compiled in profile-opt mode: X-Git-Tag: v2.7.13rc1~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb20a2174053148ba22d4d50a86bcef430c1b66f;p=python 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 8d3d772e1c..313af2b4ba 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 @@ Traceback \(most recent call first\): @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 = '''