[Python-checkins] cpython (2.7): Issue #23445: Fix test_gdb.python_is_optimized() for CFLAGS=-Og

victor.stinner python-checkins at python.org
Fri Mar 27 15:44:53 CET 2015


https://hg.python.org/cpython/rev/5b5a22b9327b
changeset:   95221:5b5a22b9327b
branch:      2.7
parent:      95204:217f95d07927
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri Mar 27 15:44:13 2015 +0100
summary:
  Issue #23445: Fix test_gdb.python_is_optimized() for CFLAGS=-Og

-Og does not optimize the C code, it's just "fast debugging".

files:
  Lib/test/test_gdb.py |  2 +-
  1 files changed, 1 insertions(+), 1 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
@@ -72,7 +72,7 @@
     for opt in cflags.split():
         if opt.startswith('-O'):
             final_opt = opt
-    return (final_opt and final_opt != '-O0')
+    return final_opt not in ('', '-O0', '-Og')
 
 def gdb_has_frame_select():
     # Does this build of gdb have gdb.Frame.select ?

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


More information about the Python-checkins mailing list