]> granicus.if.org Git - python/commitdiff
skip two test_gdb tests that fail when compiled in profile-opt mode:
authorGregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) <greg@krypto.org>
Thu, 8 Sep 2016 21:51:26 +0000 (21:51 +0000)
committerGregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) <greg@krypto.org>
Thu, 8 Sep 2016 21:51:26 +0000 (21:51 +0000)
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.

Lib/test/test_gdb.py

index 8d3d772e1c1332110f26aa7d543fca761059328c..313af2b4bab637b6435d1490b2fc1e27322ae31f 100644 (file)
@@ -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 = '''