mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-03 11:28:45 +08:00
Use "require" for Python tests
This changes various tests to use "require" for the Python feature.
This commit is contained in:
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
load_lib "ada.exp"
|
load_lib "ada.exp"
|
||||||
|
|
||||||
require !skip_ada_tests
|
require !skip_ada_tests !skip_python_tests
|
||||||
|
|
||||||
standard_ada_testfile foo
|
standard_ada_testfile foo
|
||||||
|
|
||||||
@ -25,9 +25,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
|
|||||||
|
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set remote_python_file \
|
set remote_python_file \
|
||||||
[gdb_remote_download host ${srcdir}/${subdir}/${gdb_test_file_name}.py]
|
[gdb_remote_download host ${srcdir}/${subdir}/${gdb_test_file_name}.py]
|
||||||
gdb_test_no_output "source ${remote_python_file}" \
|
gdb_test_no_output "source ${remote_python_file}" \
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
load_lib "ada.exp"
|
load_lib "ada.exp"
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
require !skip_ada_tests
|
require !skip_ada_tests !skip_python_tests
|
||||||
|
|
||||||
standard_ada_testfile foo
|
standard_ada_testfile foo
|
||||||
|
|
||||||
@ -26,9 +26,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
|
|||||||
|
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
# Skip this testcase if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
|
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
|
||||||
runto "foo.adb:$bp_location"
|
runto "foo.adb:$bp_location"
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
load_lib "ada.exp"
|
load_lib "ada.exp"
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
require !skip_ada_tests
|
require !skip_ada_tests !skip_python_tests
|
||||||
|
|
||||||
standard_ada_testfile main
|
standard_ada_testfile main
|
||||||
|
|
||||||
@ -26,9 +26,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
|
|||||||
|
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
# Skip this testcase if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set bp_location [gdb_get_line_number "STOP" ${testdir}/main.adb]
|
set bp_location [gdb_get_line_number "STOP" ${testdir}/main.adb]
|
||||||
runto "main.adb:$bp_location"
|
runto "main.adb:$bp_location"
|
||||||
|
|
||||||
|
@ -51,13 +51,12 @@
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip this test if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
standard_testfile .c
|
standard_testfile .c
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
|
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
@ -44,9 +46,6 @@ if {![runto_main]} {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip this test if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
||||||
gdb_test_no_output "source ${pyfile}" "load python file"
|
gdb_test_no_output "source ${pyfile}" "load python file"
|
||||||
|
|
||||||
|
@ -17,10 +17,7 @@ load_lib dwarf.exp
|
|||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
# This test can only be run on targets which support DWARF-2 and use gas.
|
# This test can only be run on targets which support DWARF-2 and use gas.
|
||||||
require dwarf2_support
|
require dwarf2_support !skip_python_tests
|
||||||
|
|
||||||
# This test can also only be run when we have python support in gdb,
|
|
||||||
# but that test can only be done after gdb has started, below.
|
|
||||||
|
|
||||||
standard_testfile main.c -dw.S
|
standard_testfile main.c -dw.S
|
||||||
|
|
||||||
@ -87,9 +84,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
|
|||||||
|
|
||||||
set GDBFLAGS $saved_gdbflags
|
set GDBFLAGS $saved_gdbflags
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_py_test_silent_cmd "python with_producer = gdb.lookup_global_symbol(\"with_producer\")" \
|
gdb_py_test_silent_cmd "python with_producer = gdb.lookup_global_symbol(\"with_producer\")" \
|
||||||
"get with_producer symbol" 0
|
"get with_producer symbol" 0
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ if [target_info exists gdb,noinferiorio] {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
|
|
||||||
if { [build_executable "failed to build" $testfile $srcfile {debug c++}] } {
|
if { [build_executable "failed to build" $testfile $srcfile {debug c++}] } {
|
||||||
@ -38,14 +40,6 @@ if { ![file readable $py_helper_script] \
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start GDB and check that we have python support.
|
|
||||||
gdb_start
|
|
||||||
if { [skip_python_tests] } {
|
|
||||||
untested "skipped gdb-gdb.py tests due to lack of python support"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
gdb_exit
|
|
||||||
|
|
||||||
# The main test. This is called by the self-test framework once GDB
|
# The main test. This is called by the self-test framework once GDB
|
||||||
# has been started on a copy of itself.
|
# has been started on a copy of itself.
|
||||||
proc test_python_helper {} {
|
proc test_python_helper {} {
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
|
|
||||||
standard_testfile -a.c -b.c
|
standard_testfile -a.c -b.c
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" "compare-enum-type" \
|
if { [prepare_for_testing "failed to prepare" "compare-enum-type" \
|
||||||
[list $srcfile $srcfile2]] } {
|
[list $srcfile $srcfile2]] } {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_test "py print(gdb.parse_and_eval('e1').type == gdb.parse_and_eval('e2').type)" "True"
|
gdb_test "py print(gdb.parse_and_eval('e1').type == gdb.parse_and_eval('e2').type)" "True"
|
||||||
|
@ -17,14 +17,13 @@
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" \
|
if { [prepare_for_testing "failed to prepare" \
|
||||||
${testfile} ${srcfile}] } {
|
${testfile} ${srcfile}] } {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if { ![runto break_here] } {
|
if { ![runto break_here] } {
|
||||||
untested "could not run to break_here"
|
untested "could not run to break_here"
|
||||||
return
|
return
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -19,16 +19,10 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
# gdb needs to be started here for skip_python_tests to work.
|
|
||||||
# prepare_for_testing could be used instead, but it could compile the program
|
|
||||||
# unnecessarily, so starting GDB like this is preferable.
|
|
||||||
gdb_start
|
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
|
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
|
||||||
untested "failed to compile"
|
untested "failed to compile"
|
||||||
return -1
|
return -1
|
||||||
|
@ -16,15 +16,13 @@
|
|||||||
# Check the gdb.Architecture.register_groups functionality.
|
# Check the gdb.Architecture.register_groups functionality.
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
require !skip_python_tests
|
||||||
standard_testfile py-arch.c
|
standard_testfile py-arch.c
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -16,15 +16,13 @@
|
|||||||
# Check the gdb.Architecture.registers functionality.
|
# Check the gdb.Architecture.registers functionality.
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
require !skip_python_tests
|
||||||
standard_testfile py-arch.c
|
standard_testfile py-arch.c
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -13,15 +13,13 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
require !skip_python_tests
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
@ -28,8 +30,6 @@ if ![runto_main] {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
proc test_as_string { } {
|
proc test_as_string { } {
|
||||||
gdb_test "p \$_as_string(2)" "\"2\""
|
gdb_test "p \$_as_string(2)" "\"2\""
|
||||||
gdb_test "p \$_as_string(enum_valid)" "\"ENUM_VALUE_B\""
|
gdb_test "p \$_as_string(enum_valid)" "\"ENUM_VALUE_B\""
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile .c -f1.c -f2.c
|
standard_testfile .c -f1.c -f2.c
|
||||||
|
|
||||||
# Two additional object files needed for this test.
|
# Two additional object files needed for this test.
|
||||||
@ -47,9 +49,6 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile -main.cc
|
standard_testfile -main.cc
|
||||||
|
|
||||||
set srcfile_lib "${testfile}-lib.cc"
|
set srcfile_lib "${testfile}-lib.cc"
|
||||||
@ -27,12 +29,6 @@ set libname "lib${testfile}"
|
|||||||
set python_autoload_file "${srcdir}/${subdir}/${libname}.so-gdb.py"
|
set python_autoload_file "${srcdir}/${subdir}/${libname}.so-gdb.py"
|
||||||
set binfile_lib [standard_output_file "${libname}.so"]
|
set binfile_lib [standard_output_file "${libname}.so"]
|
||||||
|
|
||||||
# Start GDB first - needed for skip_python_tests.
|
|
||||||
clean_restart
|
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# Compile library.
|
# Compile library.
|
||||||
if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} \
|
if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} \
|
||||||
{debug c++}] != "" } {
|
{debug c++}] != "" } {
|
||||||
@ -47,6 +43,8 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} \
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clean_restart
|
||||||
|
|
||||||
# Make the -gdb.py script available to gdb, it is automatically loaded by
|
# Make the -gdb.py script available to gdb, it is automatically loaded by
|
||||||
# gdb if it is put in the same directory as the library.
|
# gdb if it is put in the same directory as the library.
|
||||||
set remote_python_autoload_file \
|
set remote_python_autoload_file \
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
|
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
|
||||||
@ -25,8 +27,6 @@ save_vars { GDBFLAGS } {
|
|||||||
clean_restart $testfile
|
clean_restart $testfile
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
clean_restart "${testfile}"
|
clean_restart "${testfile}"
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return
|
return
|
||||||
|
@ -26,6 +26,8 @@ set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
set options {debug c++}
|
set options {debug c++}
|
||||||
@ -34,9 +36,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${options}]
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
proc_with_prefix test_bkpt_basic { } {
|
proc_with_prefix test_bkpt_basic { } {
|
||||||
global srcfile testfile hex decimal
|
global srcfile testfile hex decimal
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
@ -28,9 +30,6 @@ if ![runto_main] {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_breakpoint "bottom_func"
|
gdb_breakpoint "bottom_func"
|
||||||
gdb_continue_to_breakpoint "bottom_func"
|
gdb_continue_to_breakpoint "bottom_func"
|
||||||
|
|
||||||
|
@ -15,12 +15,11 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# Each test data has 4 parts:
|
# Each test data has 4 parts:
|
||||||
# 1. The string used in 'show XXX-charset' command,
|
# 1. The string used in 'show XXX-charset' command,
|
||||||
# 2. The string expected in the output of the command used in #1,
|
# 2. The string expected in the output of the command used in #1,
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -17,14 +17,13 @@ set testfile "py-completion"
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
||||||
set discard 0
|
set discard 0
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# Tab completion tests require readline support, and this set of tests
|
# Tab completion tests require readline support, and this set of tests
|
||||||
# doesn't work on a remote host either.
|
# doesn't work on a remote host either.
|
||||||
if { [readline_is_used] && ![is_remote host] } {
|
if { [readline_is_used] && ![is_remote host] } {
|
||||||
|
@ -25,15 +25,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile py-connection.c
|
standard_testfile py-connection.c
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] then {
|
if ![runto_main] then {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -20,15 +20,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug"] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug"] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
fail "can't run to main"
|
fail "can't run to main"
|
||||||
return 0
|
return 0
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
# Check that Python is supported.
|
require !skip_python_tests
|
||||||
|
|
||||||
clean_restart
|
clean_restart
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# A global counter used to number the tests.
|
# A global counter used to number the tests.
|
||||||
set idx 0
|
set idx 0
|
||||||
|
@ -20,13 +20,12 @@ set testfile "py-error"
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set charset "IBM1047"
|
set charset "IBM1047"
|
||||||
|
|
||||||
set test2 "main reached"
|
set test2 "main reached"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
require !skip_shlib_tests
|
require !skip_shlib_tests !skip_python_tests
|
||||||
|
|
||||||
if {[get_compiler_info]} {
|
if {[get_compiler_info]} {
|
||||||
warning "Could not get compiler info"
|
warning "Could not get compiler info"
|
||||||
@ -49,8 +49,6 @@ if {![runto_main]} {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { return }
|
|
||||||
|
|
||||||
gdb_test_no_output "set var libname = \"$binfile2_dlopen\""
|
gdb_test_no_output "set var libname = \"$binfile2_dlopen\""
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-event-load.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-event-load.py]
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
require !use_gdb_stub
|
require !use_gdb_stub !skip_python_tests
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
@ -34,8 +34,6 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|
|||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_test_no_output "python import gdb.events"
|
gdb_test_no_output "python import gdb.events"
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
|
||||||
|
@ -22,6 +22,8 @@ if {[target_info gdb_protocol] == "remote"
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile py-evthreads.c
|
standard_testfile py-evthreads.c
|
||||||
|
|
||||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||||
@ -29,8 +31,6 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
|||||||
}
|
}
|
||||||
clean_restart $testfile
|
clean_restart $testfile
|
||||||
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
|
||||||
gdb_test_no_output "source ${pyfile}" "load python file"
|
gdb_test_no_output "source ${pyfile}" "load python file"
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
require support_displaced_stepping
|
require support_displaced_stepping !skip_python_tests
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
@ -28,8 +28,6 @@ save_vars { GDBFLAGS } {
|
|||||||
clean_restart $testfile
|
clean_restart $testfile
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
|
||||||
gdb_test_no_output "source ${pyfile}" "load python file"
|
gdb_test_no_output "source ${pyfile}" "load python file"
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# This file is part of the GDB testsuite. It tests the mechanism
|
# This file is part of the GDB testsuite. It tests the mechanism
|
||||||
# exposing values to Python.
|
# exposing values to Python.
|
||||||
|
|
||||||
require !skip_cplus_tests
|
require !skip_cplus_tests !skip_python_tests
|
||||||
|
|
||||||
standard_testfile py-explore.cc
|
standard_testfile py-explore.cc
|
||||||
|
|
||||||
@ -24,9 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set int_ptr_ref_desc "The value of 'int_ptr_ref' is of type 'int_ptr' which is a typedef of type 'int \\*'.*\'int_ptr_ref' is a pointer to a value of type 'int'.*"
|
set int_ptr_ref_desc "The value of 'int_ptr_ref' is of type 'int_ptr' which is a typedef of type 'int \\*'.*\'int_ptr_ref' is a pointer to a value of type 'int'.*"
|
||||||
|
|
||||||
set b_desc "The value of 'b' is a struct/class of type 'B' with the following fields:.*\
|
set b_desc "The value of 'b' is a struct/class of type 'B' with the following fields:.*\
|
||||||
|
@ -15,13 +15,12 @@
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set SS "struct SimpleStruct"
|
set SS "struct SimpleStruct"
|
||||||
set SU "union SimpleUnion"
|
set SU "union SimpleUnion"
|
||||||
set CS "struct ComplexStruct"
|
set CS "struct ComplexStruct"
|
||||||
|
@ -17,15 +17,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] then {
|
if ![runto_main] then {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# This file is part of the GDB testsuite. It tests the mechanism
|
# This file is part of the GDB testsuite. It tests the mechanism
|
||||||
# exposing values to Python.
|
# exposing values to Python.
|
||||||
|
|
||||||
require !skip_shlib_tests
|
require !skip_shlib_tests !skip_python_tests
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
@ -37,8 +37,6 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|
|||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test FinishBreakpoint in normal conditions
|
# Test FinishBreakpoint in normal conditions
|
||||||
#
|
#
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
require !skip_python_tests
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
foreach func_name { foo bar } {
|
foreach func_name { foo bar } {
|
||||||
@ -31,9 +32,6 @@ set binary_bar [standard_output_file "${testfile}-bar"]
|
|||||||
|
|
||||||
clean_restart $binary_foo
|
clean_restart $binary_foo
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# Build inferior to language specification.
|
# Build inferior to language specification.
|
||||||
proc build_inferior {exefile lang} {
|
proc build_inferior {exefile lang} {
|
||||||
|
@ -15,13 +15,12 @@
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -15,15 +15,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# The following tests require execution.
|
# The following tests require execution.
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
|
@ -19,15 +19,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile amd64-py-framefilter-invalidarg.S
|
standard_testfile amd64-py-framefilter-invalidarg.S
|
||||||
|
|
||||||
if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
|
||||||
@ -32,9 +34,6 @@ if {[build_executable $testfile.exp $testfile $srcfile {}] == -1} {
|
|||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
|
# 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
|
# Care is taken to put it in the same directory as the binary so that
|
||||||
# gdb will find it.
|
# gdb will find it.
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
# We cannot use prepare_for_testing as we have to set the safe-patch
|
# We cannot use prepare_for_testing as we have to set the safe-patch
|
||||||
@ -30,9 +32,6 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
|||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_test "info frame-filter" \
|
gdb_test "info frame-filter" \
|
||||||
"No frame filters\\." \
|
"No frame filters\\." \
|
||||||
"info frame filter before loading filters"
|
"info frame filter before loading filters"
|
||||||
@ -291,9 +290,6 @@ if {[build_executable $testfile.exp $testfile $srcfile {nodebug}] == -1} {
|
|||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
|
# 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
|
# Care is taken to put it in the same directory as the binary so that
|
||||||
# gdb will find it.
|
# gdb will find it.
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_test_multiline "input convenience function" \
|
gdb_test_multiline "input convenience function" \
|
||||||
"python" "" \
|
"python" "" \
|
||||||
"class test_func (gdb.Function):" "" \
|
"class test_func (gdb.Function):" "" \
|
||||||
|
@ -18,13 +18,12 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
clean_restart
|
clean_restart
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { return }
|
|
||||||
|
|
||||||
# Skip this test if the tracemalloc module is not available.
|
# Skip this test if the tracemalloc module is not available.
|
||||||
if { ![gdb_py_module_available "tracemalloc"] } {
|
if { ![gdb_py_module_available "tracemalloc"] } {
|
||||||
unsupported "tracemalloc module not available"
|
unsupported "tracemalloc module not available"
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
|
if { [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
|
||||||
@ -27,9 +29,6 @@ if { [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable
|
|||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
clean_restart ${testfile}
|
clean_restart ${testfile}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
switch [get_endianness] {
|
switch [get_endianness] {
|
||||||
little { set python_pack_char "<" }
|
little { set python_pack_char "<" }
|
||||||
big { set python_pack_char ">" }
|
big { set python_pack_char ">" }
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_test_multiline "install new_thread event handler" \
|
gdb_test_multiline "install new_thread event handler" \
|
||||||
"python" "" \
|
"python" "" \
|
||||||
"seen_a_thread = False" "" \
|
"seen_a_thread = False" "" \
|
||||||
|
@ -17,15 +17,13 @@
|
|||||||
# symbol (i.e. a symbol for a goto label).
|
# symbol (i.e. a symbol for a goto label).
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
require !skip_python_tests
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main ] {
|
if ![runto_main ] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
require !skip_python_tests
|
||||||
set opts {}
|
set opts {}
|
||||||
standard_testfile .S
|
standard_testfile .S
|
||||||
|
|
||||||
@ -34,9 +35,6 @@ if ![runto_main] {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_py_test_silent_cmd "python lt = gdb.selected_frame().find_sal().symtab.linetable()" \
|
gdb_py_test_silent_cmd "python lt = gdb.selected_frame().find_sal().symtab.linetable()" \
|
||||||
"get instruction" 0
|
"get instruction" 0
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
# Note that the purpose of this testcase is to test the behavior
|
# Note that the purpose of this testcase is to test the behavior
|
||||||
# of gdb.lookup_type searching for the primitive types internally
|
# of gdb.lookup_type searching for the primitive types internally
|
||||||
# created by each language since GDB. So, we must start GDB without
|
# created by each language since GDB. So, we must start GDB without
|
||||||
@ -27,9 +29,6 @@ gdb_exit
|
|||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
proc test_lookup_type { lang type_name } {
|
proc test_lookup_type { lang type_name } {
|
||||||
gdb_test_no_output "set language ${lang}"
|
gdb_test_no_output "set language ${lang}"
|
||||||
gdb_test "python print(gdb.lookup_type('${type_name}').name)" \
|
gdb_test "python print(gdb.lookup_type('${type_name}').name)" \
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
load_lib mi-support.exp
|
load_lib mi-support.exp
|
||||||
set MIFLAGS "-i=mi2"
|
set MIFLAGS "-i=mi2"
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
if [mi_gdb_start] {
|
if [mi_gdb_start] {
|
||||||
return
|
return
|
||||||
@ -31,8 +33,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { return }
|
|
||||||
|
|
||||||
set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
|
set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
|
||||||
|
|
||||||
mi_delete_breakpoints
|
mi_delete_breakpoints
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
load_lib mi-support.exp
|
load_lib mi-support.exp
|
||||||
set MIFLAGS "-i=mi2"
|
set MIFLAGS "-i=mi2"
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
if [mi_gdb_start] {
|
if [mi_gdb_start] {
|
||||||
return
|
return
|
||||||
@ -31,8 +33,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { return }
|
|
||||||
|
|
||||||
# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
|
# 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
|
# Care is taken to put it in the same directory as the binary so that
|
||||||
# gdb will find it.
|
# gdb will find it.
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
load_lib mi-support.exp
|
load_lib mi-support.exp
|
||||||
set MIFLAGS "-i=mi"
|
set MIFLAGS "-i=mi"
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
#
|
#
|
||||||
# Start here
|
# Start here
|
||||||
#
|
#
|
||||||
@ -29,9 +31,6 @@ if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" }
|
|||||||
|
|
||||||
mi_clean_restart $binfile
|
mi_clean_restart $binfile
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
||||||
mi_gdb_test "source ${pyfile}" \
|
mi_gdb_test "source ${pyfile}" \
|
||||||
".*\\^done" \
|
".*\\^done" \
|
||||||
|
@ -19,14 +19,7 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
standard_testfile
|
require !skip_python_tests
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
|
||||||
gdb_exit
|
|
||||||
gdb_start
|
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
@ -26,9 +28,6 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
|||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
|
# 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
|
# Care is taken to put it in the same directory as the binary so that
|
||||||
# gdb will find it.
|
# gdb will find it.
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -18,12 +18,11 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
clean_restart
|
clean_restart
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
proc py_param_test_maybe_no_output { command pattern args } {
|
proc py_param_test_maybe_no_output { command pattern args } {
|
||||||
if [string length $pattern] {
|
if [string length $pattern] {
|
||||||
gdb_test $command $pattern $args
|
gdb_test $command $pattern $args
|
||||||
|
@ -17,15 +17,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -15,13 +15,12 @@
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto tick_tock] {
|
if ![runto tick_tock] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -23,15 +23,14 @@ if [is_remote host] {
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -15,13 +15,12 @@
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto tick_tock] {
|
if ![runto tick_tock] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set remote_python_file [gdb_remote_download host \
|
set remote_python_file [gdb_remote_download host \
|
||||||
${srcdir}/${subdir}/${testfile}.py]
|
${srcdir}/${subdir}/${testfile}.py]
|
||||||
|
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
proc run_lang_tests {exefile lang} {
|
proc run_lang_tests {exefile lang} {
|
||||||
global srcdir subdir srcfile testfile hex
|
global srcdir subdir srcfile testfile hex
|
||||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
||||||
@ -30,9 +32,6 @@ gdb_exit
|
|||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_test "python print (gdb.current_progspace().filename)" "None" \
|
gdb_test "python print (gdb.current_progspace().filename)" "None" \
|
||||||
"current progspace filename (None)"
|
"current progspace filename (None)"
|
||||||
gdb_test "python print (gdb.progspaces())" "\\\[<gdb.Progspace object at $hex>\\\]"
|
gdb_test "python print (gdb.progspaces())" "\\\[<gdb.Progspace object at $hex>\\\]"
|
||||||
|
@ -21,15 +21,7 @@ standard_testfile
|
|||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
load_lib prompt.exp
|
load_lib prompt.exp
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
require !skip_python_tests
|
||||||
|
|
||||||
gdb_exit
|
|
||||||
gdb_start
|
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
gdb_exit
|
|
||||||
|
|
||||||
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
||||||
return -1
|
return -1
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile py-rbreak.c py-rbreak-func2.c
|
standard_testfile py-rbreak.c py-rbreak-func2.c
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } {
|
if {[prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Skip this test if btrace is disabled.
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
require !skip_btrace_tests
|
require !skip_btrace_tests !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
@ -27,14 +27,6 @@ if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {deb
|
|||||||
}
|
}
|
||||||
clean_restart $testfile
|
clean_restart $testfile
|
||||||
|
|
||||||
# Skip this test if python is disabled.
|
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
|
||||||
if { [skip_python_tests] } {
|
|
||||||
untested "skipping python tests"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
|
|
||||||
if { ![runto_main] } {
|
if { ![runto_main] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
# Skip this test if btrace is disabled.
|
# Skip this test if btrace is disabled.
|
||||||
|
|
||||||
require !skip_btrace_tests
|
require !skip_btrace_tests !skip_python_tests
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
@ -25,13 +25,6 @@ standard_testfile
|
|||||||
|
|
||||||
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 }
|
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 }
|
||||||
|
|
||||||
# Skip this test if python is disabled.
|
|
||||||
|
|
||||||
if { [skip_python_tests] } {
|
|
||||||
untested "skipping python tests"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
# Skip this test if target does not support recording.
|
# Skip this test if target does not support recording.
|
||||||
|
|
||||||
require supports_process_record
|
require supports_process_record !skip_python_tests
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
@ -25,13 +25,6 @@ standard_testfile
|
|||||||
|
|
||||||
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 }
|
if [prepare_for_testing "failed to prepare" $testfile $srcfile] { return -1 }
|
||||||
|
|
||||||
# Skip this test if python is disabled.
|
|
||||||
|
|
||||||
if { [skip_python_tests] } {
|
|
||||||
untested "skipping python tests"
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -24,15 +24,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
||||||
|
|
||||||
gdb_test "source ${pyfile}" "Python script imported" \
|
gdb_test "source ${pyfile}" "Python script imported" \
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# exposing rvalue reference values to Python. It is based on
|
# exposing rvalue reference values to Python. It is based on
|
||||||
# gdb.python/py-value-cc.exp.
|
# gdb.python/py-value-cc.exp.
|
||||||
|
|
||||||
require !skip_cplus_tests
|
require !skip_cplus_tests !skip_python_tests
|
||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
|
|
||||||
@ -26,9 +26,6 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile \
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if {[skip_python_tests]} { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,8 @@ if {![istarget *-*-linux*]
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
# Make this available to gdb before the program starts, it is
|
# Make this available to gdb before the program starts, it is
|
||||||
@ -48,9 +50,6 @@ if {[build_executable $testfile.exp $testfile $srcfile \
|
|||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
# Try first with a restrictive safe-path.
|
# Try first with a restrictive safe-path.
|
||||||
|
@ -24,16 +24,12 @@ load_lib gdbserver-support.exp
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
require !skip_gdbserver_tests
|
require !skip_gdbserver_tests !skip_python_tests
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Make sure we're disconnected, in case we're testing with an
|
# Make sure we're disconnected, in case we're testing with an
|
||||||
# extended-remote board, therefore already connected.
|
# extended-remote board, therefore already connected.
|
||||||
gdb_test "disconnect" ".*"
|
gdb_test "disconnect" ".*"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
require !skip_shlib_tests
|
require !skip_shlib_tests !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
@ -41,9 +41,6 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opt
|
|||||||
clean_restart $testfile
|
clean_restart $testfile
|
||||||
gdb_load_shlib ${library}
|
gdb_load_shlib ${library}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# The following tests require execution.
|
# The following tests require execution.
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
|
@ -16,12 +16,7 @@
|
|||||||
# Test the flags within GDB that can be used to control how Python is
|
# Test the flags within GDB that can be used to control how Python is
|
||||||
# initialized.
|
# initialized.
|
||||||
|
|
||||||
gdb_start
|
require !skip_python_tests
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
gdb_exit
|
|
||||||
|
|
||||||
# Return a list containing two directory paths for newly created home
|
# Return a list containing two directory paths for newly created home
|
||||||
# directories.
|
# directories.
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
@ -28,9 +30,6 @@ if ![runto_main] {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
proc test_all_strfns { } {
|
proc test_all_strfns { } {
|
||||||
gdb_test "p \$_streq (str1, str2)" " = 1"
|
gdb_test "p \$_streq (str1, str2)" " = 1"
|
||||||
gdb_test "p \$_streq (str1, str3)" " = 0"
|
gdb_test "p \$_streq (str1, str3)" " = 0"
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile py-symbol.c py-symbol-2.c
|
standard_testfile py-symbol.c py-symbol-2.c
|
||||||
|
|
||||||
set opts { debug additional_flags=-DUSE_TWO_FILES }
|
set opts { debug additional_flags=-DUSE_TWO_FILES }
|
||||||
@ -26,9 +28,6 @@ if {[prepare_for_testing "failed to prepare" $testfile \
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set readnow_p [readnow]
|
set readnow_p [readnow]
|
||||||
|
|
||||||
# Check that we find all static symbols before the inferior has
|
# Check that we find all static symbols before the inferior has
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile py-symbol.c
|
standard_testfile py-symbol.c
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -20,20 +20,10 @@
|
|||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
require can_spawn_for_attach
|
require can_spawn_for_attach !skip_python_tests
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
# Start with a fresh gdb.
|
|
||||||
|
|
||||||
gdb_exit
|
|
||||||
gdb_start
|
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
gdb_exit
|
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# This file is part of the GDB testsuite. It tests the mechanism
|
# This file is part of the GDB testsuite. It tests the mechanism
|
||||||
# exposing values to Python.
|
# exposing values to Python.
|
||||||
|
|
||||||
require !skip_cplus_tests
|
require !skip_cplus_tests !skip_python_tests
|
||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
|
||||||
@ -31,9 +31,6 @@ gdb_exit
|
|||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
proc test_template_arg {exefile type} {
|
proc test_template_arg {exefile type} {
|
||||||
global testfile srcdir subdir srcfile
|
global testfile srcdir subdir srcfile
|
||||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" \
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" \
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
|
||||||
@ -29,9 +31,6 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
|||||||
|
|
||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
runto_main
|
runto_main
|
||||||
|
|
||||||
gdb_test "break after_mc_barrier" \
|
gdb_test "break after_mc_barrier" \
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
require !skip_cplus_tests
|
require !skip_cplus_tests !skip_python_tests
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
load_lib cp-support.exp
|
load_lib cp-support.exp
|
||||||
@ -24,8 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set remote_python_file [gdb_remote_download host \
|
set remote_python_file [gdb_remote_download host \
|
||||||
${srcdir}/${subdir}/${testfile}.py]
|
${srcdir}/${subdir}/${testfile}.py]
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
|
||||||
@ -25,9 +27,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# The following tests require execution.
|
# The following tests require execution.
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
|
@ -18,15 +18,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
|
@ -38,15 +38,14 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if {![runto_main]} {
|
if {![runto_main]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
# Stack protection can make the stack look a bit different, breaking the
|
# Stack protection can make the stack look a bit different, breaking the
|
||||||
@ -29,9 +31,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug $fla
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
# This test runs on a specific platform.
|
# This test runs on a specific platform.
|
||||||
if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue }
|
if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue }
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# This file is part of the GDB testsuite. It tests the mechanism
|
# This file is part of the GDB testsuite. It tests the mechanism
|
||||||
# exposing values to Python.
|
# exposing values to Python.
|
||||||
|
|
||||||
require !skip_cplus_tests
|
require !skip_cplus_tests !skip_python_tests
|
||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
|
|
||||||
@ -24,9 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
standard_testfile
|
standard_testfile
|
||||||
|
|
||||||
set has_argv0 [gdb_has_argv0]
|
set has_argv0 [gdb_has_argv0]
|
||||||
@ -634,9 +636,6 @@ if { [build_inferior "${binfile}" "c"] < 0 } {
|
|||||||
# Start with a fresh gdb.
|
# Start with a fresh gdb.
|
||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
test_history_count
|
test_history_count
|
||||||
test_value_creation
|
test_value_creation
|
||||||
test_value_reinit
|
test_value_reinit
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
require !skip_cplus_tests
|
require !skip_cplus_tests !skip_python_tests
|
||||||
|
|
||||||
standard_testfile py-xmethods.cc
|
standard_testfile py-xmethods.cc
|
||||||
|
|
||||||
@ -26,12 +26,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } {
|
|
||||||
untested "skipping Python tests"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if ![runto_main] {
|
if ![runto_main] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
|
||||||
|
require !skip_python_tests
|
||||||
|
|
||||||
tuiterm_env
|
tuiterm_env
|
||||||
|
|
||||||
clean_restart
|
clean_restart
|
||||||
@ -26,11 +28,6 @@ if {[skip_tui_tests]} {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } {
|
|
||||||
untested "skipping Python tests"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
# Define a function we can use as a window constructor. If this ever
|
# Define a function we can use as a window constructor. If this ever
|
||||||
# gets called we'll throw an error, but that's OK, this test doesn't
|
# gets called we'll throw an error, but that's OK, this test doesn't
|
||||||
# actually try to create any windows.
|
# actually try to create any windows.
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
# Test a TUI window implemented in Python.
|
# Test a TUI window implemented in Python.
|
||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
|
require !skip_python_tests
|
||||||
tuiterm_env
|
tuiterm_env
|
||||||
|
|
||||||
# This test doesn't care about the inferior.
|
# This test doesn't care about the inferior.
|
||||||
@ -32,9 +33,6 @@ if {[skip_tui_tests]} {
|
|||||||
|
|
||||||
Term::clean_restart 24 80 $testfile
|
Term::clean_restart 24 80 $testfile
|
||||||
|
|
||||||
# Skip all tests if Python scripting is not enabled.
|
|
||||||
if { [skip_python_tests] } { continue }
|
|
||||||
|
|
||||||
set remote_python_file [gdb_remote_download host \
|
set remote_python_file [gdb_remote_download host \
|
||||||
${srcdir}/${subdir}/${testfile}.py]
|
${srcdir}/${subdir}/${testfile}.py]
|
||||||
gdb_test_no_output "source ${remote_python_file}" \
|
gdb_test_no_output "source ${remote_python_file}" \
|
||||||
|
@ -17,15 +17,13 @@
|
|||||||
|
|
||||||
load_lib gdb-python.exp
|
load_lib gdb-python.exp
|
||||||
load_lib rust-support.exp
|
load_lib rust-support.exp
|
||||||
require !skip_rust_tests
|
require !skip_rust_tests !skip_python_tests
|
||||||
|
|
||||||
standard_testfile .rs
|
standard_testfile .rs
|
||||||
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
|
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [skip_python_tests] } { return }
|
|
||||||
|
|
||||||
set remote_python_file [gdb_remote_download host \
|
set remote_python_file [gdb_remote_download host \
|
||||||
${srcdir}/${subdir}/${testfile}.py]
|
${srcdir}/${subdir}/${testfile}.py]
|
||||||
gdb_test_no_output "source ${remote_python_file}" "load python file"
|
gdb_test_no_output "source ${remote_python_file}" "load python file"
|
||||||
|
@ -23,15 +23,7 @@ load_lib gdbserver-support.exp
|
|||||||
|
|
||||||
standard_testfile multi-ui-errors.c
|
standard_testfile multi-ui-errors.c
|
||||||
|
|
||||||
require !skip_gdbserver_tests
|
require !skip_gdbserver_tests !skip_python_tests
|
||||||
|
|
||||||
# Gdb needs to be running for skip_python_tests, but exit once we're done,
|
|
||||||
# we'll start a custom gdb after this.
|
|
||||||
clean_restart
|
|
||||||
if { [skip_python_tests] } {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
gdb_exit
|
|
||||||
|
|
||||||
if {[build_executable "failed to prepare" ${testfile} \
|
if {[build_executable "failed to prepare" ${testfile} \
|
||||||
${srcfile}] == -1} {
|
${srcfile}] == -1} {
|
||||||
|
@ -72,7 +72,7 @@ proc check_thread_local {number} {
|
|||||||
"= $expected_value" \
|
"= $expected_value" \
|
||||||
"${number} thread local storage"
|
"${number} thread local storage"
|
||||||
|
|
||||||
if {!$::has_python_support} {
|
if {![skip_python_tests]} {
|
||||||
gdb_test_no_output \
|
gdb_test_no_output \
|
||||||
"python sym = gdb.lookup_symbol('a_thread_local')\[0\]" \
|
"python sym = gdb.lookup_symbol('a_thread_local')\[0\]" \
|
||||||
"${number} look up a_thread_local symbol"
|
"${number} look up a_thread_local symbol"
|
||||||
@ -155,9 +155,6 @@ proc check_thread_stack {number spin_threads spin_threads_level} {
|
|||||||
|
|
||||||
clean_restart ${binfile}
|
clean_restart ${binfile}
|
||||||
|
|
||||||
# Set this to avoid calling skip_python_tests repeatedly.
|
|
||||||
set has_python_support [skip_python_tests]
|
|
||||||
|
|
||||||
gdb_test_multiple "print a_thread_local" "" {
|
gdb_test_multiple "print a_thread_local" "" {
|
||||||
-re -wrap "Cannot find thread-local variables on this target" {
|
-re -wrap "Cannot find thread-local variables on this target" {
|
||||||
kfail "gdb/25807" $gdb_test_name
|
kfail "gdb/25807" $gdb_test_name
|
||||||
|
Reference in New Issue
Block a user