aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.ada/pp-rec-component.exp5
-rw-r--r--gdb/testsuite/gdb.ada/py_range.exp5
-rw-r--r--gdb/testsuite/gdb.ada/py_taft.exp5
-rw-r--r--gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp5
-rw-r--r--gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/symtab-producer.exp8
-rw-r--r--gdb/testsuite/gdb.gdb/python-helper.exp10
-rw-r--r--gdb/testsuite/gdb.python/compare-enum-type.exp4
-rw-r--r--gdb/testsuite/gdb.python/flexible-array-member.exp5
-rw-r--r--gdb/testsuite/gdb.python/lib-types.exp5
-rw-r--r--gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp10
-rw-r--r--gdb/testsuite/gdb.python/py-arch-reg-groups.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-arch-reg-names.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-arch.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-as-string.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-auto-load-chaining.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp10
-rw-r--r--gdb/testsuite/gdb.python/py-bad-printers.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-block.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-bp-locations.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-breakpoint.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-caller-is.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-charset.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-cmd.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-completion.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-connection-removed.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-connection.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-disasm.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-doc-reformat.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-error.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-event-load.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-events.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-evsignal.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-evthreads.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-explore-cc.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-explore.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-finish-breakpoint.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-finish-breakpoint2.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-format-address.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-format-string.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-frame-args.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-frame-inline.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-frame.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-framefilter-addr.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-framefilter.exp8
-rw-r--r--gdb/testsuite/gdb.python/py-function.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-inferior-leak.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-inferior.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-infthread.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-label-symbol-value.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-lazy-string.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-linetable.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-lookup-type.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-mi-events.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-mi-objfile.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-nested-maps.exp9
-rw-r--r--gdb/testsuite/gdb.python/py-objfile-script.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-objfile.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-parameter.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-pending-frame-level.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-pp-integral.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-pp-maint.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-pp-re-notag.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-pp-registration.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-prettyprint.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-progspace.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-prompt.exp10
-rw-r--r--gdb/testsuite/gdb.python/py-rbreak.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-record-btrace-threads.exp12
-rw-r--r--gdb/testsuite/gdb.python/py-record-btrace.exp9
-rw-r--r--gdb/testsuite/gdb.python/py-record-full.exp9
-rw-r--r--gdb/testsuite/gdb.python/py-recurse-unwind.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-section-script.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-send-packet.exp6
-rw-r--r--gdb/testsuite/gdb.python/py-shared.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-startup-opt.exp7
-rw-r--r--gdb/testsuite/gdb.python/py-strfns.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-symbol.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-symtab.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-sync-interp.exp12
-rw-r--r--gdb/testsuite/gdb.python/py-template.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-thrhandle.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-typeprint.exp4
-rw-r--r--gdb/testsuite/gdb.python/py-unwind-inline.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-unwind-maint.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-unwind-user-regs.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-unwind.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-value-cc.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-value.exp5
-rw-r--r--gdb/testsuite/gdb.python/py-xmethods.exp8
-rw-r--r--gdb/testsuite/gdb.python/tui-window-names.exp7
-rw-r--r--gdb/testsuite/gdb.python/tui-window.exp4
-rw-r--r--gdb/testsuite/gdb.rust/pp.exp4
-rw-r--r--gdb/testsuite/gdb.server/server-kill-python.exp10
-rw-r--r--gdb/testsuite/gdb.threads/tls.exp5
100 files changed, 170 insertions, 374 deletions
diff --git a/gdb/testsuite/gdb.ada/pp-rec-component.exp b/gdb/testsuite/gdb.ada/pp-rec-component.exp
index f5963ff..b57bde3 100644
--- a/gdb/testsuite/gdb.ada/pp-rec-component.exp
+++ b/gdb/testsuite/gdb.ada/pp-rec-component.exp
@@ -15,7 +15,7 @@
load_lib "ada.exp"
-require !skip_ada_tests
+require !skip_ada_tests !skip_python_tests
standard_ada_testfile foo
@@ -25,9 +25,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
clean_restart ${testfile}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
set remote_python_file \
[gdb_remote_download host ${srcdir}/${subdir}/${gdb_test_file_name}.py]
gdb_test_no_output "source ${remote_python_file}" \
diff --git a/gdb/testsuite/gdb.ada/py_range.exp b/gdb/testsuite/gdb.ada/py_range.exp
index d1a84b6..b2c91fb 100644
--- a/gdb/testsuite/gdb.ada/py_range.exp
+++ b/gdb/testsuite/gdb.ada/py_range.exp
@@ -16,7 +16,7 @@
load_lib "ada.exp"
load_lib gdb-python.exp
-require !skip_ada_tests
+require !skip_ada_tests !skip_python_tests
standard_ada_testfile foo
@@ -26,9 +26,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
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]
runto "foo.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.ada/py_taft.exp b/gdb/testsuite/gdb.ada/py_taft.exp
index ea9e7b1..543bc72 100644
--- a/gdb/testsuite/gdb.ada/py_taft.exp
+++ b/gdb/testsuite/gdb.ada/py_taft.exp
@@ -16,7 +16,7 @@
load_lib "ada.exp"
load_lib gdb-python.exp
-require !skip_ada_tests
+require !skip_ada_tests !skip_python_tests
standard_ada_testfile main
@@ -26,9 +26,6 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
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]
runto "main.adb:$bp_location"
diff --git a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
index f525b1a..88e95d1 100644
--- a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
+++ b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
@@ -51,13 +51,12 @@
standard_testfile
+require !skip_python_tests
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
return -1
}
-# Skip this test if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
index e21ff2e..f5c55f5 100644
--- a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
+++ b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp
@@ -36,6 +36,8 @@
standard_testfile .c
+require !skip_python_tests
+
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
}
@@ -44,9 +46,6 @@ if {![runto_main]} {
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]
gdb_test_no_output "source ${pyfile}" "load python file"
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index 50cb428..545d76f 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -17,10 +17,7 @@ load_lib dwarf.exp
load_lib gdb-python.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-require dwarf2_support
-
-# 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.
+require dwarf2_support !skip_python_tests
standard_testfile main.c -dw.S
@@ -87,9 +84,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
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\")" \
"get with_producer symbol" 0
diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp
index d6c316c..3c0e2e5 100644
--- a/gdb/testsuite/gdb.gdb/python-helper.exp
+++ b/gdb/testsuite/gdb.gdb/python-helper.exp
@@ -24,6 +24,8 @@ if [target_info exists gdb,noinferiorio] {
return
}
+require !skip_python_tests
+
standard_testfile .cc
if { [build_executable "failed to build" $testfile $srcfile {debug c++}] } {
@@ -38,14 +40,6 @@ if { ![file readable $py_helper_script] \
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
# has been started on a copy of itself.
proc test_python_helper {} {
diff --git a/gdb/testsuite/gdb.python/compare-enum-type.exp b/gdb/testsuite/gdb.python/compare-enum-type.exp
index 8d5d65e..0cc6bd9 100644
--- a/gdb/testsuite/gdb.python/compare-enum-type.exp
+++ b/gdb/testsuite/gdb.python/compare-enum-type.exp
@@ -17,11 +17,11 @@
standard_testfile -a.c -b.c
+require !skip_python_tests
+
if { [prepare_for_testing "failed to prepare" "compare-enum-type" \
[list $srcfile $srcfile2]] } {
return
}
-if { [skip_python_tests] } { continue }
-
gdb_test "py print(gdb.parse_and_eval('e1').type == gdb.parse_and_eval('e2').type)" "True"
diff --git a/gdb/testsuite/gdb.python/flexible-array-member.exp b/gdb/testsuite/gdb.python/flexible-array-member.exp
index bed3c97..23f1da0 100644
--- a/gdb/testsuite/gdb.python/flexible-array-member.exp
+++ b/gdb/testsuite/gdb.python/flexible-array-member.exp
@@ -17,14 +17,13 @@
standard_testfile
+require !skip_python_tests
+
if { [prepare_for_testing "failed to prepare" \
${testfile} ${srcfile}] } {
return
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if { ![runto break_here] } {
untested "could not run to break_here"
return
diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp
index bf3aff1..92359c9 100644
--- a/gdb/testsuite/gdb.python/lib-types.exp
+++ b/gdb/testsuite/gdb.python/lib-types.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
index f58044e..64414a3 100644
--- a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
+++ b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.exp
@@ -19,15 +19,9 @@
load_lib gdb-python.exp
-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
+require !skip_python_tests
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
+standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
untested "failed to compile"
diff --git a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
index a4cafdc..5a0077d 100644
--- a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
+++ b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp
@@ -16,15 +16,13 @@
# Check the gdb.Architecture.register_groups functionality.
load_lib gdb-python.exp
+require !skip_python_tests
standard_testfile py-arch.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-arch-reg-names.exp b/gdb/testsuite/gdb.python/py-arch-reg-names.exp
index 67ceeff..73e4140 100644
--- a/gdb/testsuite/gdb.python/py-arch-reg-names.exp
+++ b/gdb/testsuite/gdb.python/py-arch-reg-names.exp
@@ -16,15 +16,13 @@
# Check the gdb.Architecture.registers functionality.
load_lib gdb-python.exp
+require !skip_python_tests
standard_testfile py-arch.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-arch.exp b/gdb/testsuite/gdb.python/py-arch.exp
index e9967ae..449613b 100644
--- a/gdb/testsuite/gdb.python/py-arch.exp
+++ b/gdb/testsuite/gdb.python/py-arch.exp
@@ -13,15 +13,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
load_lib gdb-python.exp
+require !skip_python_tests
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-as-string.exp b/gdb/testsuite/gdb.python/py-as-string.exp
index 9ae6f5d..8bf248a 100644
--- a/gdb/testsuite/gdb.python/py-as-string.exp
+++ b/gdb/testsuite/gdb.python/py-as-string.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
@@ -28,8 +30,6 @@ if ![runto_main] {
return 0
}
-if { [skip_python_tests] } { continue }
-
proc test_as_string { } {
gdb_test "p \$_as_string(2)" "\"2\""
gdb_test "p \$_as_string(enum_valid)" "\"ENUM_VALUE_B\""
diff --git a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
index 9b7b0b5..aac6eb3 100644
--- a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
+++ b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp
@@ -19,6 +19,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile .c -f1.c -f2.c
# Two additional object files needed for this test.
@@ -47,9 +49,6 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp b/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
index 97a0f24..a67ae48 100644
--- a/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
+++ b/gdb/testsuite/gdb.python/py-autoloaded-pretty-printers-in-newobjfile-event.exp
@@ -19,6 +19,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile -main.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 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.
if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} \
{debug c++}] != "" } {
@@ -47,6 +43,8 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} \
return -1
}
+clean_restart
+
# 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.
set remote_python_autoload_file \
diff --git a/gdb/testsuite/gdb.python/py-bad-printers.exp b/gdb/testsuite/gdb.python/py-bad-printers.exp
index 7249639..26e6a97 100644
--- a/gdb/testsuite/gdb.python/py-bad-printers.exp
+++ b/gdb/testsuite/gdb.python/py-bad-printers.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp
index bbf9eaf..90c3b4d 100644
--- a/gdb/testsuite/gdb.python/py-block.exp
+++ b/gdb/testsuite/gdb.python/py-block.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-bp-locations.exp b/gdb/testsuite/gdb.python/py-bp-locations.exp
index a389443..55aca67 100644
--- a/gdb/testsuite/gdb.python/py-bp-locations.exp
+++ b/gdb/testsuite/gdb.python/py-bp-locations.exp
@@ -15,6 +15,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
@@ -25,8 +27,6 @@ save_vars { GDBFLAGS } {
clean_restart $testfile
}
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
index ec9d553..6c1a262 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint-create-fail.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
clean_restart "${testfile}"
if ![runto_main] {
return
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index 49c0979..0995ae4 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -26,6 +26,8 @@ set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests]
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
set options {debug c++}
@@ -34,9 +36,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${options}]
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
proc_with_prefix test_bkpt_basic { } {
global srcfile testfile hex decimal
diff --git a/gdb/testsuite/gdb.python/py-caller-is.exp b/gdb/testsuite/gdb.python/py-caller-is.exp
index d1bf56f..66e0ce5 100644
--- a/gdb/testsuite/gdb.python/py-caller-is.exp
+++ b/gdb/testsuite/gdb.python/py-caller-is.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
@@ -28,9 +30,6 @@ if ![runto_main] {
return 0
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
gdb_breakpoint "bottom_func"
gdb_continue_to_breakpoint "bottom_func"
diff --git a/gdb/testsuite/gdb.python/py-charset.exp b/gdb/testsuite/gdb.python/py-charset.exp
index b496178..9e83195 100644
--- a/gdb/testsuite/gdb.python/py-charset.exp
+++ b/gdb/testsuite/gdb.python/py-charset.exp
@@ -15,12 +15,11 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
gdb_exit
gdb_start
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
# Each test data has 4 parts:
# 1. The string used in 'show XXX-charset' command,
# 2. The string expected in the output of the command used in #1,
diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp
index 7070688..0eb785f 100644
--- a/gdb/testsuite/gdb.python/py-cmd.exp
+++ b/gdb/testsuite/gdb.python/py-cmd.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-completion.exp b/gdb/testsuite/gdb.python/py-completion.exp
index f466853..bf1abf3 100644
--- a/gdb/testsuite/gdb.python/py-completion.exp
+++ b/gdb/testsuite/gdb.python/py-completion.exp
@@ -17,14 +17,13 @@ set testfile "py-completion"
load_lib gdb-python.exp
+require !skip_python_tests
+
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
set discard 0
gdb_exit
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
# doesn't work on a remote host either.
if { [readline_is_used] && ![is_remote host] } {
diff --git a/gdb/testsuite/gdb.python/py-connection-removed.exp b/gdb/testsuite/gdb.python/py-connection-removed.exp
index 8ffd995..efbcf46 100644
--- a/gdb/testsuite/gdb.python/py-connection-removed.exp
+++ b/gdb/testsuite/gdb.python/py-connection-removed.exp
@@ -25,15 +25,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile py-connection.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] then {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-connection.exp b/gdb/testsuite/gdb.python/py-connection.exp
index 0719fe3..78710fd 100644
--- a/gdb/testsuite/gdb.python/py-connection.exp
+++ b/gdb/testsuite/gdb.python/py-connection.exp
@@ -20,15 +20,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-disasm.exp b/gdb/testsuite/gdb.python/py-disasm.exp
index 3aa77d4..57f8fdf 100644
--- a/gdb/testsuite/gdb.python/py-disasm.exp
+++ b/gdb/testsuite/gdb.python/py-disasm.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug"] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
fail "can't run to main"
return 0
diff --git a/gdb/testsuite/gdb.python/py-doc-reformat.exp b/gdb/testsuite/gdb.python/py-doc-reformat.exp
index 5af64d6..3829873 100644
--- a/gdb/testsuite/gdb.python/py-doc-reformat.exp
+++ b/gdb/testsuite/gdb.python/py-doc-reformat.exp
@@ -19,9 +19,9 @@
load_lib gdb-python.exp
-# Check that Python is supported.
+require !skip_python_tests
+
clean_restart
-if { [skip_python_tests] } { continue }
# A global counter used to number the tests.
set idx 0
diff --git a/gdb/testsuite/gdb.python/py-error.exp b/gdb/testsuite/gdb.python/py-error.exp
index b04be6a..0a8fd19 100644
--- a/gdb/testsuite/gdb.python/py-error.exp
+++ b/gdb/testsuite/gdb.python/py-error.exp
@@ -20,13 +20,12 @@ set testfile "py-error"
load_lib gdb-python.exp
+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 }
-
set charset "IBM1047"
set test2 "main reached"
diff --git a/gdb/testsuite/gdb.python/py-event-load.exp b/gdb/testsuite/gdb.python/py-event-load.exp
index 8dce6f1..f363125 100644
--- a/gdb/testsuite/gdb.python/py-event-load.exp
+++ b/gdb/testsuite/gdb.python/py-event-load.exp
@@ -18,7 +18,7 @@
load_lib gdb-python.exp
-require !skip_shlib_tests
+require !skip_shlib_tests !skip_python_tests
if {[get_compiler_info]} {
warning "Could not get compiler info"
@@ -49,8 +49,6 @@ if {![runto_main]} {
return
}
-if { [skip_python_tests] } { return }
-
gdb_test_no_output "set var libname = \"$binfile2_dlopen\""
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-event-load.py]
diff --git a/gdb/testsuite/gdb.python/py-events.exp b/gdb/testsuite/gdb.python/py-events.exp
index 109f8c1..ea1a6f5 100644
--- a/gdb/testsuite/gdb.python/py-events.exp
+++ b/gdb/testsuite/gdb.python/py-events.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# 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
@@ -34,8 +34,6 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
# Start with a fresh gdb.
clean_restart ${testfile}
-if { [skip_python_tests] } { continue }
-
gdb_test_no_output "python import gdb.events"
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
diff --git a/gdb/testsuite/gdb.python/py-evsignal.exp b/gdb/testsuite/gdb.python/py-evsignal.exp
index 03e2f8b..2f0e791 100644
--- a/gdb/testsuite/gdb.python/py-evsignal.exp
+++ b/gdb/testsuite/gdb.python/py-evsignal.exp
@@ -22,6 +22,8 @@ if {[target_info gdb_protocol] == "remote"
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile py-evthreads.c
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
-if { [skip_python_tests] } { continue }
-
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
gdb_test_no_output "source ${pyfile}" "load python file"
diff --git a/gdb/testsuite/gdb.python/py-evthreads.exp b/gdb/testsuite/gdb.python/py-evthreads.exp
index fde5501..e993c6f 100644
--- a/gdb/testsuite/gdb.python/py-evthreads.exp
+++ b/gdb/testsuite/gdb.python/py-evthreads.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# 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
@@ -28,8 +28,6 @@ save_vars { GDBFLAGS } {
clean_restart $testfile
}
-if { [skip_python_tests] } { continue }
-
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-events.py]
gdb_test_no_output "source ${pyfile}" "load python file"
diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp
index bb42b56..d3678cf 100644
--- a/gdb/testsuite/gdb.python/py-explore-cc.exp
+++ b/gdb/testsuite/gdb.python/py-explore-cc.exp
@@ -16,7 +16,7 @@
# This file is part of the GDB testsuite. It tests the mechanism
# exposing values to Python.
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
standard_testfile py-explore.cc
@@ -24,9 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
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 b_desc "The value of 'b' is a struct/class of type 'B' with the following fields:.*\
diff --git a/gdb/testsuite/gdb.python/py-explore.exp b/gdb/testsuite/gdb.python/py-explore.exp
index 8b6e677..dd36740 100644
--- a/gdb/testsuite/gdb.python/py-explore.exp
+++ b/gdb/testsuite/gdb.python/py-explore.exp
@@ -15,13 +15,12 @@
standard_testfile
+require !skip_python_tests
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
set SS "struct SimpleStruct"
set SU "union SimpleUnion"
set CS "struct ComplexStruct"
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
index 7855714..d414268 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
@@ -17,15 +17,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] then {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index 7cc2c40..d37508c 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -16,7 +16,7 @@
# This file is part of the GDB testsuite. It tests the mechanism
# exposing values to Python.
-require !skip_shlib_tests
+require !skip_shlib_tests !skip_python_tests
load_lib gdb-python.exp
@@ -37,8 +37,6 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
# Start with a fresh gdb.
clean_restart ${testfile}
-if { [skip_python_tests] } { continue }
-
#
# Test FinishBreakpoint in normal conditions
#
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
index 7eb394e..3000205 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-format-address.exp b/gdb/testsuite/gdb.python/py-format-address.exp
index c90acad..d9fed3f 100644
--- a/gdb/testsuite/gdb.python/py-format-address.exp
+++ b/gdb/testsuite/gdb.python/py-format-address.exp
@@ -14,6 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
load_lib gdb-python.exp
+require !skip_python_tests
standard_testfile
foreach func_name { foo bar } {
@@ -31,9 +32,6 @@ set binary_bar [standard_output_file "${testfile}-bar"]
clean_restart $binary_foo
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp
index 6599fe3..30a57b2 100644
--- a/gdb/testsuite/gdb.python/py-format-string.exp
+++ b/gdb/testsuite/gdb.python/py-format-string.exp
@@ -18,12 +18,12 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
-# Skip all tests if Python scripting is not enabled.
gdb_exit
gdb_start
-if { [skip_python_tests] } { continue }
# Build inferior to language specification.
proc build_inferior {exefile lang} {
diff --git a/gdb/testsuite/gdb.python/py-frame-args.exp b/gdb/testsuite/gdb.python/py-frame-args.exp
index 2ecc80d..091e26d 100644
--- a/gdb/testsuite/gdb.python/py-frame-args.exp
+++ b/gdb/testsuite/gdb.python/py-frame-args.exp
@@ -15,13 +15,12 @@
standard_testfile
+require !skip_python_tests
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-frame-inline.exp b/gdb/testsuite/gdb.python/py-frame-inline.exp
index d755c66..719ec18 100644
--- a/gdb/testsuite/gdb.python/py-frame-inline.exp
+++ b/gdb/testsuite/gdb.python/py-frame-inline.exp
@@ -15,15 +15,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
index fca732c..f17e2f9 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
# The following tests require execution.
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.python/py-framefilter-addr.exp b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
index 2cda4e5..5dad3bd 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-addr.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-addr.exp
@@ -19,15 +19,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
index 43bb535..86a830d 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
@@ -15,6 +15,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile amd64-py-framefilter-invalidarg.S
if { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
@@ -32,9 +34,6 @@ if {[build_executable $testfile.exp $testfile $srcfile {}] == -1} {
gdb_exit
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.
# Care is taken to put it in the same directory as the binary so that
# gdb will find it.
diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp
index ac214fc..81101c1 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
# 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_start
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
gdb_test "info frame-filter" \
"No frame filters\\." \
"info frame filter before loading filters"
@@ -291,9 +290,6 @@ if {[build_executable $testfile.exp $testfile $srcfile {nodebug}] == -1} {
gdb_exit
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.
# Care is taken to put it in the same directory as the binary so that
# gdb will find it.
diff --git a/gdb/testsuite/gdb.python/py-function.exp b/gdb/testsuite/gdb.python/py-function.exp
index 358a085..7c48f7a 100644
--- a/gdb/testsuite/gdb.python/py-function.exp
+++ b/gdb/testsuite/gdb.python/py-function.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
# 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_test_multiline "input convenience function" \
"python" "" \
"class test_func (gdb.Function):" "" \
diff --git a/gdb/testsuite/gdb.python/py-inferior-leak.exp b/gdb/testsuite/gdb.python/py-inferior-leak.exp
index 1eff7ae..4e2fa64 100644
--- a/gdb/testsuite/gdb.python/py-inferior-leak.exp
+++ b/gdb/testsuite/gdb.python/py-inferior-leak.exp
@@ -18,13 +18,12 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
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.
if { ![gdb_py_module_available "tracemalloc"] } {
unsupported "tracemalloc module not available"
diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp
index ee6b9fc..0286d82 100644
--- a/gdb/testsuite/gdb.python/py-inferior.exp
+++ b/gdb/testsuite/gdb.python/py-inferior.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
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.
clean_restart ${testfile}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
switch [get_endianness] {
little { set python_pack_char "<" }
big { set python_pack_char ">" }
diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp
index 4e468bf..47c6b19 100644
--- a/gdb/testsuite/gdb.python/py-infthread.exp
+++ b/gdb/testsuite/gdb.python/py-infthread.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
gdb_test_multiline "install new_thread event handler" \
"python" "" \
"seen_a_thread = False" "" \
diff --git a/gdb/testsuite/gdb.python/py-label-symbol-value.exp b/gdb/testsuite/gdb.python/py-label-symbol-value.exp
index 3aea2bb..f3e91b7 100644
--- a/gdb/testsuite/gdb.python/py-label-symbol-value.exp
+++ b/gdb/testsuite/gdb.python/py-label-symbol-value.exp
@@ -17,15 +17,13 @@
# symbol (i.e. a symbol for a goto label).
load_lib gdb-python.exp
+require !skip_python_tests
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-lazy-string.exp b/gdb/testsuite/gdb.python/py-lazy-string.exp
index 57c6c1c..9f3bad5 100644
--- a/gdb/testsuite/gdb.python/py-lazy-string.exp
+++ b/gdb/testsuite/gdb.python/py-lazy-string.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main ] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-linetable.exp b/gdb/testsuite/gdb.python/py-linetable.exp
index 19c3e74..ff43821 100644
--- a/gdb/testsuite/gdb.python/py-linetable.exp
+++ b/gdb/testsuite/gdb.python/py-linetable.exp
@@ -14,6 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
load_lib gdb-python.exp
+require !skip_python_tests
set opts {}
standard_testfile .S
@@ -34,9 +35,6 @@ if ![runto_main] {
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()" \
"get instruction" 0
diff --git a/gdb/testsuite/gdb.python/py-lookup-type.exp b/gdb/testsuite/gdb.python/py-lookup-type.exp
index d81b352..7527c13 100644
--- a/gdb/testsuite/gdb.python/py-lookup-type.exp
+++ b/gdb/testsuite/gdb.python/py-lookup-type.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
# Note that the purpose of this testcase is to test the behavior
# of gdb.lookup_type searching for the primitive types internally
# created by each language since GDB. So, we must start GDB without
@@ -27,9 +29,6 @@ gdb_exit
gdb_start
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 } {
gdb_test_no_output "set language ${lang}"
gdb_test "python print(gdb.lookup_type('${type_name}').name)" \
diff --git a/gdb/testsuite/gdb.python/py-mi-events.exp b/gdb/testsuite/gdb.python/py-mi-events.exp
index d3ffb15..4ed3405 100644
--- a/gdb/testsuite/gdb.python/py-mi-events.exp
+++ b/gdb/testsuite/gdb.python/py-mi-events.exp
@@ -18,6 +18,8 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
+require !skip_python_tests
+
gdb_exit
if [mi_gdb_start] {
return
@@ -31,8 +33,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-if { [skip_python_tests] } { return }
-
set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
mi_delete_breakpoints
diff --git a/gdb/testsuite/gdb.python/py-mi-objfile.exp b/gdb/testsuite/gdb.python/py-mi-objfile.exp
index 2aaf65d..1b25862 100644
--- a/gdb/testsuite/gdb.python/py-mi-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-mi-objfile.exp
@@ -18,6 +18,8 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
+require !skip_python_tests
+
gdb_exit
if [mi_gdb_start] {
return
@@ -31,8 +33,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-if { [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
# gdb will find it.
diff --git a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
index 77227b6..b618b08 100644
--- a/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
+++ b/gdb/testsuite/gdb.python/py-mi-var-info-path-expression.exp
@@ -18,6 +18,8 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi"
+require !skip_python_tests
+
#
# Start here
#
@@ -29,9 +31,6 @@ if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" }
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]
mi_gdb_test "source ${pyfile}" \
".*\\^done" \
diff --git a/gdb/testsuite/gdb.python/py-nested-maps.exp b/gdb/testsuite/gdb.python/py-nested-maps.exp
index 35cb100..76e38c2 100644
--- a/gdb/testsuite/gdb.python/py-nested-maps.exp
+++ b/gdb/testsuite/gdb.python/py-nested-maps.exp
@@ -19,14 +19,7 @@
load_lib gdb-python.exp
-standard_testfile
-
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
+require !skip_python_tests
standard_testfile
diff --git a/gdb/testsuite/gdb.python/py-objfile-script.exp b/gdb/testsuite/gdb.python/py-objfile-script.exp
index 33068a7..550a684 100644
--- a/gdb/testsuite/gdb.python/py-objfile-script.exp
+++ b/gdb/testsuite/gdb.python/py-objfile-script.exp
@@ -18,6 +18,8 @@
standard_testfile
+require !skip_python_tests
+
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1
}
@@ -26,9 +28,6 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
gdb_exit
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.
# Care is taken to put it in the same directory as the binary so that
# gdb will find it.
diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp
index 811db0c..cf9d5ae 100644
--- a/gdb/testsuite/gdb.python/py-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-objfile.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-parameter.exp b/gdb/testsuite/gdb.python/py-parameter.exp
index 3a11707..ab99817 100644
--- a/gdb/testsuite/gdb.python/py-parameter.exp
+++ b/gdb/testsuite/gdb.python/py-parameter.exp
@@ -18,12 +18,11 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
# Start with a fresh gdb.
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 } {
if [string length $pattern] {
gdb_test $command $pattern $args
diff --git a/gdb/testsuite/gdb.python/py-pending-frame-level.exp b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
index a00a23c..b83eaa3 100644
--- a/gdb/testsuite/gdb.python/py-pending-frame-level.exp
+++ b/gdb/testsuite/gdb.python/py-pending-frame-level.exp
@@ -17,15 +17,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-pp-integral.exp b/gdb/testsuite/gdb.python/py-pp-integral.exp
index a576bcb..3fa2476 100644
--- a/gdb/testsuite/gdb.python/py-pp-integral.exp
+++ b/gdb/testsuite/gdb.python/py-pp-integral.exp
@@ -15,13 +15,12 @@
standard_testfile
+require !skip_python_tests
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto tick_tock] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-pp-maint.exp b/gdb/testsuite/gdb.python/py-pp-maint.exp
index 7e8afa4..5e6f23a 100644
--- a/gdb/testsuite/gdb.python/py-pp-maint.exp
+++ b/gdb/testsuite/gdb.python/py-pp-maint.exp
@@ -23,15 +23,14 @@ if [is_remote host] {
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-pp-re-notag.exp b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
index a576bcb..3fa2476 100644
--- a/gdb/testsuite/gdb.python/py-pp-re-notag.exp
+++ b/gdb/testsuite/gdb.python/py-pp-re-notag.exp
@@ -15,13 +15,12 @@
standard_testfile
+require !skip_python_tests
+
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto tick_tock] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-pp-registration.exp b/gdb/testsuite/gdb.python/py-pp-registration.exp
index 32bd2ac..c85fc4a 100644
--- a/gdb/testsuite/gdb.python/py-pp-registration.exp
+++ b/gdb/testsuite/gdb.python/py-pp-registration.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
set remote_python_file [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index bdd92ec..8166e11 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
# Start with a fresh gdb.
gdb_exit
gdb_start
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
proc run_lang_tests {exefile lang} {
global srcdir subdir srcfile testfile hex
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" executable "debug $lang"] != "" } {
diff --git a/gdb/testsuite/gdb.python/py-progspace.exp b/gdb/testsuite/gdb.python/py-progspace.exp
index 33460b8..23b328a 100644
--- a/gdb/testsuite/gdb.python/py-progspace.exp
+++ b/gdb/testsuite/gdb.python/py-progspace.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
@@ -30,9 +32,6 @@ gdb_exit
gdb_start
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" \
"current progspace filename (None)"
gdb_test "python print (gdb.progspaces())" "\\\[<gdb.Progspace object at $hex>\\\]"
diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index 03a730b..56a0b47 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -21,15 +21,7 @@ standard_testfile
load_lib gdb-python.exp
load_lib prompt.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
+require !skip_python_tests
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1
diff --git a/gdb/testsuite/gdb.python/py-rbreak.exp b/gdb/testsuite/gdb.python/py-rbreak.exp
index 2d39141..6c5f77e 100644
--- a/gdb/testsuite/gdb.python/py-rbreak.exp
+++ b/gdb/testsuite/gdb.python/py-rbreak.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile py-rbreak.c py-rbreak-func2.c
if {[prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } {
return 1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
index ef14edce..f0845f8 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
@@ -15,9 +15,9 @@
# You should have received a copy of the GNU General Public License
# 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
@@ -27,14 +27,6 @@ if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {deb
}
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] } {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp
index 38c326f..1326e82 100644
--- a/gdb/testsuite/gdb.python/py-record-btrace.exp
+++ b/gdb/testsuite/gdb.python/py-record-btrace.exp
@@ -17,7 +17,7 @@
# Skip this test if btrace is disabled.
-require !skip_btrace_tests
+require !skip_btrace_tests !skip_python_tests
load_lib gdb-python.exp
@@ -25,13 +25,6 @@ standard_testfile
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]} {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp
index fe19d6b..eb40d51 100644
--- a/gdb/testsuite/gdb.python/py-record-full.exp
+++ b/gdb/testsuite/gdb.python/py-record-full.exp
@@ -17,7 +17,7 @@
# 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
@@ -25,13 +25,6 @@ standard_testfile
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]} {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-recurse-unwind.exp b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
index 6e62393..498443e 100644
--- a/gdb/testsuite/gdb.python/py-recurse-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-recurse-unwind.exp
@@ -24,15 +24,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
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]
gdb_test "source ${pyfile}" "Python script imported" \
diff --git a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
index 98eb94f..66a0101 100644
--- a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp
@@ -17,7 +17,7 @@
# exposing rvalue reference values to Python. It is based on
# gdb.python/py-value-cc.exp.
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
standard_testfile .cc
@@ -26,9 +26,6 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile \
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if {[skip_python_tests]} { continue }
-
if {![runto_main]} {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index d3d2a6c..96dafdb 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -28,6 +28,8 @@ if {![istarget *-*-linux*]
return
}
+require !skip_python_tests
+
standard_testfile
# 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_start
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
gdb_reinitialize_dir $srcdir/$subdir
# Try first with a restrictive safe-path.
diff --git a/gdb/testsuite/gdb.python/py-send-packet.exp b/gdb/testsuite/gdb.python/py-send-packet.exp
index c6305ed..e09dbb0 100644
--- a/gdb/testsuite/gdb.python/py-send-packet.exp
+++ b/gdb/testsuite/gdb.python/py-send-packet.exp
@@ -24,16 +24,12 @@ load_lib gdbserver-support.exp
standard_testfile
-require !skip_gdbserver_tests
+require !skip_gdbserver_tests !skip_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-if { [skip_python_tests] } {
- return 0
-}
-
# Make sure we're disconnected, in case we're testing with an
# extended-remote board, therefore already connected.
gdb_test "disconnect" ".*"
diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp
index ac68e2c..fdec1df 100644
--- a/gdb/testsuite/gdb.python/py-shared.exp
+++ b/gdb/testsuite/gdb.python/py-shared.exp
@@ -17,7 +17,7 @@
load_lib gdb-python.exp
-require !skip_shlib_tests
+require !skip_shlib_tests !skip_python_tests
standard_testfile
@@ -41,9 +41,6 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opt
clean_restart $testfile
gdb_load_shlib ${library}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
# The following tests require execution.
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.python/py-startup-opt.exp b/gdb/testsuite/gdb.python/py-startup-opt.exp
index 89f97fd..2d9fd2a 100644
--- a/gdb/testsuite/gdb.python/py-startup-opt.exp
+++ b/gdb/testsuite/gdb.python/py-startup-opt.exp
@@ -16,12 +16,7 @@
# Test the flags within GDB that can be used to control how Python is
# initialized.
-gdb_start
-
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
-gdb_exit
+require !skip_python_tests
# Return a list containing two directory paths for newly created home
# directories.
diff --git a/gdb/testsuite/gdb.python/py-strfns.exp b/gdb/testsuite/gdb.python/py-strfns.exp
index 94d7180..162e102 100644
--- a/gdb/testsuite/gdb.python/py-strfns.exp
+++ b/gdb/testsuite/gdb.python/py-strfns.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
@@ -28,9 +30,6 @@ if ![runto_main] {
return 0
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
proc test_all_strfns { } {
gdb_test "p \$_streq (str1, str2)" " = 1"
gdb_test "p \$_streq (str1, str3)" " = 0"
diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
index d2192bf..a0bf34d 100644
--- a/gdb/testsuite/gdb.python/py-symbol.exp
+++ b/gdb/testsuite/gdb.python/py-symbol.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile py-symbol.c py-symbol-2.c
set opts { debug additional_flags=-DUSE_TWO_FILES }
@@ -26,9 +28,6 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
set readnow_p [readnow]
# Check that we find all static symbols before the inferior has
diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp
index 43d693e..5b68524 100644
--- a/gdb/testsuite/gdb.python/py-symtab.exp
+++ b/gdb/testsuite/gdb.python/py-symtab.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile py-symbol.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-sync-interp.exp b/gdb/testsuite/gdb.python/py-sync-interp.exp
index 408a165..1e994bf 100644
--- a/gdb/testsuite/gdb.python/py-sync-interp.exp
+++ b/gdb/testsuite/gdb.python/py-sync-interp.exp
@@ -20,20 +20,10 @@
standard_testfile
-require can_spawn_for_attach
+require can_spawn_for_attach !skip_python_tests
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}] } {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp
index 1383e3a..14ebb67 100644
--- a/gdb/testsuite/gdb.python/py-template.exp
+++ b/gdb/testsuite/gdb.python/py-template.exp
@@ -16,7 +16,7 @@
# This file is part of the GDB testsuite. It tests the mechanism
# exposing values to Python.
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
standard_testfile .cc
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
@@ -31,9 +31,6 @@ gdb_exit
gdb_start
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} {
global testfile srcdir subdir srcfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" \
diff --git a/gdb/testsuite/gdb.python/py-thrhandle.exp b/gdb/testsuite/gdb.python/py-thrhandle.exp
index d8fa2e6..0806f89 100644
--- a/gdb/testsuite/gdb.python/py-thrhandle.exp
+++ b/gdb/testsuite/gdb.python/py-thrhandle.exp
@@ -21,6 +21,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
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}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
runto_main
gdb_test "break after_mc_barrier" \
diff --git a/gdb/testsuite/gdb.python/py-typeprint.exp b/gdb/testsuite/gdb.python/py-typeprint.exp
index abf95e5..37e2929 100644
--- a/gdb/testsuite/gdb.python/py-typeprint.exp
+++ b/gdb/testsuite/gdb.python/py-typeprint.exp
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# 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 cp-support.exp
@@ -24,8 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
-if { [skip_python_tests] } { continue }
-
set remote_python_file [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
diff --git a/gdb/testsuite/gdb.python/py-unwind-inline.exp b/gdb/testsuite/gdb.python/py-unwind-inline.exp
index 964d90a..c0dc7f2 100644
--- a/gdb/testsuite/gdb.python/py-unwind-inline.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-inline.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
@@ -25,9 +27,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
# The following tests require execution.
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.python/py-unwind-maint.exp b/gdb/testsuite/gdb.python/py-unwind-maint.exp
index f050669..3fcbe4f 100644
--- a/gdb/testsuite/gdb.python/py-unwind-maint.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-maint.exp
@@ -18,15 +18,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
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]
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
index c62d4f0..1598f86 100644
--- a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
+++ b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp
@@ -38,15 +38,14 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp
index 1810214..2d279bf 100644
--- a/gdb/testsuite/gdb.python/py-unwind.exp
+++ b/gdb/testsuite/gdb.python/py-unwind.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
# 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
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
# This test runs on a specific platform.
if { ![istarget x86_64-*-* ] || ![is_lp64_target] } { continue }
diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp
index f62c1df..4085a87 100644
--- a/gdb/testsuite/gdb.python/py-value-cc.exp
+++ b/gdb/testsuite/gdb.python/py-value-cc.exp
@@ -16,7 +16,7 @@
# This file is part of the GDB testsuite. It tests the mechanism
# exposing values to Python.
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
standard_testfile .cc
@@ -24,9 +24,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
index a4964e1..8ab188c 100644
--- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
standard_testfile
set has_argv0 [gdb_has_argv0]
@@ -634,9 +636,6 @@ if { [build_inferior "${binfile}" "c"] < 0 } {
# Start with a fresh gdb.
clean_restart ${binfile}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
test_history_count
test_value_creation
test_value_reinit
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index 8db5c39..6a9e5f2 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -18,7 +18,7 @@
load_lib gdb-python.exp
-require !skip_cplus_tests
+require !skip_cplus_tests !skip_python_tests
standard_testfile py-xmethods.cc
@@ -26,12 +26,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } {
- untested "skipping Python tests"
- return
-}
-
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.python/tui-window-names.exp b/gdb/testsuite/gdb.python/tui-window-names.exp
index 9fcd864..48f3c6b 100644
--- a/gdb/testsuite/gdb.python/tui-window-names.exp
+++ b/gdb/testsuite/gdb.python/tui-window-names.exp
@@ -18,6 +18,8 @@
load_lib gdb-python.exp
+require !skip_python_tests
+
tuiterm_env
clean_restart
@@ -26,11 +28,6 @@ if {[skip_tui_tests]} {
return
}
-if { [skip_python_tests] } {
- untested "skipping Python tests"
- return
-}
-
# 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
# actually try to create any windows.
diff --git a/gdb/testsuite/gdb.python/tui-window.exp b/gdb/testsuite/gdb.python/tui-window.exp
index 1dd8e37..2f04155 100644
--- a/gdb/testsuite/gdb.python/tui-window.exp
+++ b/gdb/testsuite/gdb.python/tui-window.exp
@@ -16,6 +16,7 @@
# Test a TUI window implemented in Python.
load_lib gdb-python.exp
+require !skip_python_tests
tuiterm_env
# This test doesn't care about the inferior.
@@ -32,9 +33,6 @@ if {[skip_tui_tests]} {
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 \
${srcdir}/${subdir}/${testfile}.py]
gdb_test_no_output "source ${remote_python_file}" \
diff --git a/gdb/testsuite/gdb.rust/pp.exp b/gdb/testsuite/gdb.rust/pp.exp
index a456afc..d23463e 100644
--- a/gdb/testsuite/gdb.rust/pp.exp
+++ b/gdb/testsuite/gdb.rust/pp.exp
@@ -17,15 +17,13 @@
load_lib gdb-python.exp
load_lib rust-support.exp
-require !skip_rust_tests
+require !skip_rust_tests !skip_python_tests
standard_testfile .rs
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
return -1
}
-if { [skip_python_tests] } { return }
-
set remote_python_file [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
gdb_test_no_output "source ${remote_python_file}" "load python file"
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp
index 1eb9e2e..4ef70da 100644
--- a/gdb/testsuite/gdb.server/server-kill-python.exp
+++ b/gdb/testsuite/gdb.server/server-kill-python.exp
@@ -23,15 +23,7 @@ load_lib gdbserver-support.exp
standard_testfile multi-ui-errors.c
-require !skip_gdbserver_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
+require !skip_gdbserver_tests !skip_python_tests
if {[build_executable "failed to prepare" ${testfile} \
${srcfile}] == -1} {
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index d2c55db..78ce987 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -72,7 +72,7 @@ proc check_thread_local {number} {
"= $expected_value" \
"${number} thread local storage"
- if {!$::has_python_support} {
+ if {![skip_python_tests]} {
gdb_test_no_output \
"python sym = gdb.lookup_symbol('a_thread_local')\[0\]" \
"${number} look up a_thread_local symbol"
@@ -155,9 +155,6 @@ proc check_thread_stack {number spin_threads spin_threads_level} {
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" "" {
-re -wrap "Cannot find thread-local variables on this target" {
kfail "gdb/25807" $gdb_test_name