]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #23445: Fix test_gdb.python_is_optimized() for CFLAGS=-Og
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 27 Mar 2015 14:44:13 +0000 (15:44 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 27 Mar 2015 14:44:13 +0000 (15:44 +0100)
-Og does not optimize the C code, it's just "fast debugging".

Lib/test/test_gdb.py

index b7577de0e5d285b9a6036d29e8b2110dbe8316d6..965601058a0643114a4ac56c005e484a635def8a 100644 (file)
@@ -72,7 +72,7 @@ def python_is_optimized():
     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 ?