Fix gdb.python/py-finish-breakpoint.exp ERROR.
authorJoel Brobecker <brobecker@gnat.com>
Sun, 13 Jan 2013 08:24:22 +0000 (08:24 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Sun, 13 Jan 2013 08:24:22 +0000 (08:24 +0000)
This patch fixes the following error, when running gdb.python/
py-finish-breakpoint.exp:

    ERROR: can't read "gdb_py_is_py24": no such variable
        while executing
    "if { $gdb_py_is_py24 == 1 } {

gdb/testsuite/ChangeLog:

        * gdb.python/py-finish-breakpoint.exp: Add skip_python_tests
        check.  Move $gdb_py_is_py24 value check right after.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-finish-breakpoint.exp

index f734bbc8ff4620d8f73680c1292a53f245a9bf7c..e6e4c500520a21c37da2f6894cea57ba1a539215 100644 (file)
@@ -1,3 +1,8 @@
+2013-01-13  Joel Brobecker  <brobecker@adacore.com>
+
+       * gdb.python/py-finish-breakpoint.exp: Add skip_python_tests
+       check.  Move $gdb_py_is_py24 value check right after.
+
 2013-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * gdb.base/dprintf.exp (dprintf info 1): Fix expectation on 64-bit
index 377af731451fc6fe3ffce763c4d41f20fba8d0be..2a35dc89ac5929e2773ff234827448e30dc2878d 100644 (file)
@@ -23,13 +23,6 @@ if {[skip_shlib_tests]} {
 
 load_lib gdb-python.exp
 
-if { $gdb_py_is_py24 == 1 } {
-    # Python 2.4, 2.5 do not support the "ValueError as e" syntax used in
-    # the py-finish-breakpoint.py script.
-       untested py-finish-breakpoint.exp
-    return 0
-}
-
 set libfile "py-events-shlib"
 set libsrc  $srcdir/$subdir/$libfile.c
 set lib_sl  [standard_output_file $libfile-nodebug.so]
@@ -51,6 +44,15 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
 # Start with a fresh gdb.
 clean_restart ${testfile}
 
+if { [skip_python_tests] } { continue }
+
+if { $gdb_py_is_py24 == 1 } {
+    # Python 2.4, 2.5 do not support the "ValueError as e" syntax used in
+    # the py-finish-breakpoint.py script.
+       untested py-finish-breakpoint.exp
+    return 0
+}
+
 set python_file ${srcdir}/${subdir}/${testfile}.py
 
 
This page took 0.046551 seconds and 4 git commands to generate.