Author: fernando Date: Thu Jun 5 14:10:15 2014 New Revision: 2907 Log: add patch for Python-2.7.7 to skip test_gdb.
Added: trunk/Python/Python-2.7.7-skip_test_gdb-1.patch Added: trunk/Python/Python-2.7.7-skip_test_gdb-1.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/Python/Python-2.7.7-skip_test_gdb-1.patch Thu Jun 5 14:10:15 2014 (r2907) @@ -0,0 +1,26 @@ +Submitted By: Fernando de Oliveira <famobr at yahoo dot com dot br> +Date: 2014-06-05 +Initial Package Version: 2.7.7 +Upstream Status: not applied +Origin: Upstream (partially) +URL: http://bugs.python.org/file17226/gdbopts.patch +Description: Skip test_gdb, if pyhton is built with optimizations + +--- a/Lib/test/test_gdb.py.orig 2014-05-31 15:58:39.000000000 -0300 ++++ b/Lib/test/test_gdb.py 2014-06-05 17:11:36.464091244 -0300 +@@ -749,6 +749,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, -- http://lists.linuxfromscratch.org/listinfo/patches FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
