summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-07-08 18:54:04 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-07-08 18:54:04 (GMT)
commit22db73523c174889764497905e7875e62f558df7 (patch)
tree8c5dd1f5faf931a05c180ba26708b78b79aa5950 /Lib
parent86ac22e33833329906f1a68b5b771a8989ce6823 (diff)
downloadcpython-22db73523c174889764497905e7875e62f558df7.zip
cpython-22db73523c174889764497905e7875e62f558df7.tar.gz
cpython-22db73523c174889764497905e7875e62f558df7.tar.bz2
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. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_gdb.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index 2a7057c..3ade185 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -8,6 +8,7 @@ import re
import subprocess
import sys
import unittest
+import sysconfig
from test.test_support import run_unittest, findfile
@@ -678,6 +679,15 @@ class PyLocalsTests(DebuggerTests):
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,