[Python-checkins] cpython (2.7): skip two test_gdb tests that fail when compiled in profile-opt mode:

gregory.p.smith python-checkins at python.org
Thu Sep 8 17:51:33 EDT 2016


https://hg.python.org/cpython/rev/c5b8de10aac2
changeset:   103364:c5b8de10aac2
branch:      2.7
parent:      103336:8567bc2876af
user:        Gregory P. Smith <greg at krypto.org> [Google Inc.]
date:        Thu Sep 08 21:51:26 2016 +0000
summary:
  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.

files:
  Lib/test/test_gdb.py |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
--- 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 = '''

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list