[Python-checkins] r82648 - in python/branches/release27-maint: Lib/test/test_gdb.py Misc/NEWS

antoine.pitrou python-checkins at python.org
Thu Jul 8 20:54:04 CEST 2010


Author: antoine.pitrou
Date: Thu Jul  8 20:54:04 2010
New Revision: 82648

Log:
Merged revisions 82647 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82647 | antoine.pitrou | 2010-07-08 20:51:30 +0200 (jeu., 08 juil. 2010) | 3 lines
  
  Issue #8605: Skip test_gdb if Python is compiled with optimizations.
........


Modified:
   python/branches/release27-maint/   (props changed)
   python/branches/release27-maint/Lib/test/test_gdb.py
   python/branches/release27-maint/Misc/NEWS

Modified: python/branches/release27-maint/Lib/test/test_gdb.py
==============================================================================
--- python/branches/release27-maint/Lib/test/test_gdb.py	(original)
+++ python/branches/release27-maint/Lib/test/test_gdb.py	Thu Jul  8 20:54:04 2010
@@ -8,6 +8,7 @@
 import subprocess
 import sys
 import unittest
+import sysconfig
 
 from test.test_support import run_unittest, findfile
 
@@ -678,6 +679,15 @@
                                     r".*\na = 1\nb = 2\nc = 3\n.*")
 
 def test_main():
+    cflags = sysconfig.get_config_vars()['PY_CFLAGS']
+    final_opt = ""
+    for opt in cflags.split():
+        if opt.startswith('-O'):
+            final_opt = opt
+    if final_opt and final_opt != '-O0':
+        raise unittest.SkipTest("Python was built with compiler optimizations, "
+                                "tests can't reliably succeed")
+
     run_unittest(PrettyPrintTests,
                  PyListTests,
                  StackNavigationTests,

Modified: python/branches/release27-maint/Misc/NEWS
==============================================================================
--- python/branches/release27-maint/Misc/NEWS	(original)
+++ python/branches/release27-maint/Misc/NEWS	Thu Jul  8 20:54:04 2010
@@ -26,6 +26,11 @@
 Extension Modules
 -----------------
 
+Tests
+-----
+
+- Issue #8605: Skip test_gdb if Python is compiled with optimizations.
+
 
 What's New in Python 2.7?
 =========================


More information about the Python-checkins mailing list