aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-01-13 08:24:22 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-01-13 08:24:22 +0000
commitf751cc976ca8422cc96b9a2d7b64d6ae370a940a (patch)
treef9d9aec0db447c6b7f51c9fee79024eacdb0dfb9 /gdb/testsuite/gdb.python/py-finish-breakpoint.exp
parent68c4a57ee620ebf9f537473f39e36f3c894e0879 (diff)
downloadgdb-f751cc976ca8422cc96b9a2d7b64d6ae370a940a.zip
gdb-f751cc976ca8422cc96b9a2d7b64d6ae370a940a.tar.gz
gdb-f751cc976ca8422cc96b9a2d7b64d6ae370a940a.tar.bz2
Fix gdb.python/py-finish-breakpoint.exp ERROR.
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.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-finish-breakpoint.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-finish-breakpoint.exp16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index 377af73..2a35dc8 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -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