mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
gdb/testsuite: fix "continue outside of loop" TCL errors
Many test cases had a few lines in the beginning that look like: if { condition } { continue } Where conditions varied, but were mostly in the form of ![runto_main] or [skip_*_tests], making it quite clear that this code block was supposed to finish the test if it entered the code block. This generates TCL errors, as most of these tests are not inside loops. All cases on which this was an obvious mistake are changed in this patch.
This commit is contained in:
@ -22,7 +22,7 @@ set MIFLAGS "-i=mi2"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
return
|
||||
}
|
||||
|
||||
standard_testfile py-framefilter-mi.c
|
||||
|
@ -23,12 +23,12 @@ standard_testfile
|
||||
clean_restart
|
||||
|
||||
# Skip all tests if Python scripting is not enabled.
|
||||
if { [skip_python_tests] } { continue }
|
||||
if { [skip_python_tests] } { return }
|
||||
|
||||
# Skip this test if the tracemalloc module is not available.
|
||||
if { ![gdb_py_module_available "tracemalloc"] } {
|
||||
unsupported "tracemalloc module not available"
|
||||
continue
|
||||
return
|
||||
}
|
||||
|
||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
||||
|
@ -20,7 +20,7 @@ set MIFLAGS "-i=mi"
|
||||
|
||||
gdb_exit
|
||||
if {[mi_gdb_start]} {
|
||||
continue
|
||||
return
|
||||
}
|
||||
|
||||
if {[lsearch -exact [mi_get_features] python] < 0} {
|
||||
|
@ -20,7 +20,7 @@ set MIFLAGS "-i=mi2"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
return
|
||||
}
|
||||
|
||||
standard_testfile
|
||||
@ -31,7 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
return -1
|
||||
}
|
||||
|
||||
if { [mi_skip_python_tests] } { continue }
|
||||
if { [mi_skip_python_tests] } { return }
|
||||
|
||||
set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
|
||||
|
||||
|
@ -20,7 +20,7 @@ set MIFLAGS "-i=mi2"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
return
|
||||
}
|
||||
|
||||
standard_testfile
|
||||
@ -31,7 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
return -1
|
||||
}
|
||||
|
||||
if { [mi_skip_python_tests] } { continue }
|
||||
if { [mi_skip_python_tests] } { return }
|
||||
|
||||
# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
|
||||
# Care is taken to put it in the same directory as the binary so that
|
||||
|
@ -21,7 +21,7 @@ set MIFLAGS "-i=mi2"
|
||||
|
||||
gdb_exit
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
return
|
||||
}
|
||||
|
||||
standard_testfile py-prettyprint.c
|
||||
@ -348,7 +348,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" \
|
||||
}
|
||||
|
||||
if [mi_gdb_start] {
|
||||
continue
|
||||
return
|
||||
}
|
||||
mi_delete_breakpoints
|
||||
mi_gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
Reference in New Issue
Block a user