Rename to allow_python_tests

This changes skip_python_tests to invert the sense, and renames it to
allow_python_tests.
This commit is contained in:
Tom Tromey 2023-01-08 11:46:05 -07:00
parent c241bf50ca
commit d82e5429b5
116 changed files with 122 additions and 122 deletions

View File

@ -78,7 +78,7 @@ foreach_with_prefix scenario {all minimal} {
"print second array slice"
# This is only supported for the DWARF encoding.
if {$scenario == "minimal" && ![skip_python_tests]} {
if {$scenario == "minimal" && [allow_python_tests]} {
gdb_test_no_output \
"python o = gdb.parse_and_eval('objects')" \
"fetch value for python"

View File

@ -15,7 +15,7 @@
load_lib "ada.exp"
require allow_ada_tests !skip_python_tests
require allow_ada_tests allow_python_tests
standard_ada_testfile foo

View File

@ -16,7 +16,7 @@
load_lib "ada.exp"
load_lib gdb-python.exp
require allow_ada_tests !skip_python_tests
require allow_ada_tests allow_python_tests
standard_ada_testfile foo

View File

@ -16,7 +16,7 @@
load_lib "ada.exp"
load_lib gdb-python.exp
require allow_ada_tests !skip_python_tests
require allow_ada_tests allow_python_tests
standard_ada_testfile main

View File

@ -48,7 +48,7 @@ foreach_with_prefix scenario {none all minimal} {
" = \\(one => 3, two => 7, str => \"zzz\", onevalue => 33, str2 => \"qqqqqqq\", twovalue => 88\\)"
# This is only supported for the DWARF encoding.
if {$scenario == "minimal" && ![skip_python_tests]} {
if {$scenario == "minimal" && [allow_python_tests]} {
gdb_test_no_output \
"python t = gdb.lookup_type('nested_and_variable')" \
"fetch type for python"

View File

@ -130,7 +130,7 @@ gdb_test "print \$bndstatus.status.error" "= 2" "bndstatus error is 2\
after a failure on allocating an entry"
# Going to test the python extension for lenght.
if { [skip_python_tests] } { continue }
if { ![allow_python_tests] } { continue }
# Verify if size is right
set test_string ".*\\\: size 0x11.*"
gdb_test "print /x \$bnd0 = {0x10, 0x20}" "$test_string" "verify size for bnd0"

View File

@ -611,7 +611,7 @@ set show_conv_list \
{$_shell_exitsignal = void} \
{$_shell_exitcode = 0} \
}
if ![skip_python_tests] {
if [allow_python_tests] {
append show_conv_list \
{
{$_memeq = <internal function _memeq>} \

View File

@ -51,7 +51,7 @@
standard_testfile
require !skip_python_tests
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
return -1

View File

@ -219,7 +219,7 @@ proc jit_reader_test {} {
"cannot assign to register"
}
if { ![skip_python_tests] } {
if { [allow_python_tests] } {
gdb_test "python print(gdb.objfiles())" \
"$any<gdb.Objfile filename=<< JIT compiled code at $hex >>>$any" \
"python gdb.Objfile.__repr__ ()"
@ -263,7 +263,7 @@ proc jit_reader_test {} {
]
}
if {![skip_python_tests]} {
if {[allow_python_tests]} {
gdb_test "python print(any(\[not x.is_file for x in gdb.objfiles()\]))" \
"True" \
"at least one non-file objfile"

View File

@ -80,7 +80,7 @@ gdb_test_multiple "p \$.array\[1\]" "" {
gdb_test "set debug target 0" ".*"
if { ! [skip_python_tests] } {
if { [allow_python_tests] } {
gdb_test_no_output "python val = gdb.parse_and_eval('global_foo')"
gdb_test "python print('val = %s' % val)" "val = \\{f = 1, array = \\{1, 2, 3, 4, 5\\}\\}"
gdb_test "python print('val.is_lazy = %s' % val.is_lazy)" "val\\.is_lazy = False"

View File

@ -36,7 +36,7 @@
standard_testfile .c
require !skip_python_tests
require allow_python_tests
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1

View File

@ -471,7 +471,7 @@ proc test_startup_version_string { } {
# expected or not, this styling requires Python support in GDB, and
# the Python pygments module to be available.
clean_restart ${binfile}
if {![skip_python_tests] && [gdb_py_module_available "pygments"]} {
if {[allow_python_tests] && [gdb_py_module_available "pygments"]} {
set python_disassembly_styling true
} else {
set python_disassembly_styling false

View File

@ -17,7 +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 !skip_python_tests
require dwarf2_support allow_python_tests
standard_testfile main.c -dw.S

View File

@ -72,8 +72,8 @@ gdb_test "break func" "Breakpoint .*" \
"set breakpoint in func"
gdb_continue_to_breakpoint "continue to func"
set skip_python [skip_python_tests]
if {!$skip_python} {
set allow_python [allow_python_tests]
if {$allow_python} {
gdb_test "python finishbp = gdb.FinishBreakpoint()" \
"Temporary breakpoint.*" "set FinishBreakpoint"
}
@ -82,7 +82,7 @@ gdb_test "finish" [multi_line \
"Run till exit from #0 $hex in func \\\(\\\)" \
".*$hex in main \\\(\\\)"]
if {!$skip_python} {
if {$allow_python} {
gdb_test "python print (finishbp.return_value)" "None" \
"check that return_value is None"
}

View File

@ -24,7 +24,7 @@ if [target_info exists gdb,noinferiorio] {
return
}
require !skip_python_tests
require allow_python_tests
standard_testfile .cc

View File

@ -23,8 +23,8 @@ if {![multi_target_prepare]} {
return
}
# Cache the result of calling skip_python_tests into a local variable.
set run_python_tests [expr ! [skip_python_tests]]
# Cache the result of calling allow_python_tests into a local variable.
set run_python_tests [allow_python_tests]
# Test "info inferiors" and "info connections". MULTI_PROCESS
# indicates whether the multi-process feature of remote targets is

View File

@ -415,7 +415,7 @@ with_test_prefix "two inferiors" {
"No threads match '3.1'\."
}
if { ![skip_python_tests] } {
if { [allow_python_tests] } {
with_test_prefix "python" {
# Check that InferiorThread.num and InferiorThread.global_num
# return the expected numbers.

View File

@ -17,7 +17,7 @@
standard_testfile -a.c -b.c
require !skip_python_tests
require allow_python_tests
if { [prepare_for_testing "failed to prepare" "compare-enum-type" \
[list $srcfile $srcfile2]] } {

View File

@ -17,7 +17,7 @@
standard_testfile
require !skip_python_tests
require allow_python_tests
if { [prepare_for_testing "failed to prepare" \
${testfile} ${srcfile}] } {

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile .cc

View File

@ -19,7 +19,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -16,7 +16,7 @@
# Check the gdb.Architecture.register_groups functionality.
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile py-arch.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {

View File

@ -16,7 +16,7 @@
# Check the gdb.Architecture.registers functionality.
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile py-arch.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {

View File

@ -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/>.
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -19,7 +19,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile .c -f1.c -f2.c

View File

@ -19,7 +19,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile -main.cc

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -15,7 +15,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -26,7 +26,7 @@ set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -15,7 +15,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
gdb_exit
gdb_start

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -17,7 +17,7 @@ set testfile "py-completion"
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
set discard 0

View File

@ -25,7 +25,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile py-connection.c

View File

@ -20,7 +20,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -19,7 +19,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
clean_restart

View File

@ -20,7 +20,7 @@ set testfile "py-error"
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
# Start with a fresh gdb.
gdb_exit

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_shlib_tests !skip_python_tests
require !skip_shlib_tests allow_python_tests
if {[get_compiler_info]} {
warning "Could not get compiler info"

View File

@ -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 !skip_python_tests
require !use_gdb_stub allow_python_tests
load_lib gdb-python.exp

View File

@ -22,7 +22,7 @@ if {[target_info gdb_protocol] == "remote"
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile py-evthreads.c

View File

@ -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 !skip_python_tests
require support_displaced_stepping allow_python_tests
load_lib gdb-python.exp

View File

@ -16,7 +16,7 @@
# This file is part of the GDB testsuite. It tests the mechanism
# exposing values to Python.
require allow_cplus_tests !skip_python_tests
require allow_cplus_tests allow_python_tests
standard_testfile py-explore.cc

View File

@ -15,7 +15,7 @@
standard_testfile
require !skip_python_tests
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1

View File

@ -17,7 +17,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -16,7 +16,7 @@
# This file is part of the GDB testsuite. It tests the mechanism
# exposing values to Python.
require !skip_shlib_tests !skip_python_tests
require !skip_shlib_tests allow_python_tests
load_lib gdb-python.exp

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile .cc

View File

@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile
foreach func_name { foo bar } {

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -15,7 +15,7 @@
standard_testfile
require !skip_python_tests
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1

View File

@ -15,7 +15,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -19,7 +19,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -15,7 +15,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile amd64-py-framefilter-invalidarg.S

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
# Start with a fresh gdb.

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -17,7 +17,7 @@
# symbol (i.e. a symbol for a goto label).
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
set opts {}
standard_testfile .S

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
# Note that the purpose of this testcase is to test the behavior
# of gdb.lookup_type searching for the primitive types internally

View File

@ -18,7 +18,7 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
require !skip_python_tests
require allow_python_tests
gdb_exit
if [mi_gdb_start] {

View File

@ -18,7 +18,7 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
require !skip_python_tests
require allow_python_tests
gdb_exit
if [mi_gdb_start] {

View File

@ -18,7 +18,7 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi"
require !skip_python_tests
require allow_python_tests
#
# Start here

View File

@ -19,7 +19,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
standard_testfile
require !skip_python_tests
require allow_python_tests
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
# Start with a fresh gdb.
clean_restart

View File

@ -17,7 +17,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -15,7 +15,7 @@
standard_testfile
require !skip_python_tests
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1

View File

@ -23,7 +23,7 @@ if [is_remote host] {
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -15,7 +15,7 @@
standard_testfile
require !skip_python_tests
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -21,7 +21,7 @@ standard_testfile
load_lib gdb-python.exp
load_lib prompt.exp
require !skip_python_tests
require allow_python_tests
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile py-rbreak.c py-rbreak-func2.c

View File

@ -17,7 +17,7 @@
load_lib gdb-python.exp
require allow_btrace_tests !skip_python_tests
require allow_btrace_tests allow_python_tests
standard_testfile

View File

@ -17,7 +17,7 @@
# Skip this test if btrace is disabled.
require allow_btrace_tests !skip_python_tests
require allow_btrace_tests allow_python_tests
load_lib gdb-python.exp

View File

@ -17,7 +17,7 @@
# Skip this test if target does not support recording.
require supports_process_record !skip_python_tests
require supports_process_record allow_python_tests
load_lib gdb-python.exp

View File

@ -24,7 +24,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -17,7 +17,7 @@
# exposing rvalue reference values to Python. It is based on
# gdb.python/py-value-cc.exp.
require allow_cplus_tests !skip_python_tests
require allow_cplus_tests allow_python_tests
standard_testfile .cc

View File

@ -28,7 +28,7 @@ if {![istarget *-*-linux*]
return
}
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -24,7 +24,7 @@ load_lib gdbserver-support.exp
standard_testfile
require allow_gdbserver_tests !skip_python_tests
require allow_gdbserver_tests allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1

View File

@ -17,7 +17,7 @@
load_lib gdb-python.exp
require !skip_shlib_tests !skip_python_tests
require !skip_shlib_tests allow_python_tests
standard_testfile

View File

@ -31,7 +31,7 @@ save_vars { env(TERM) } {
return -1
}
if { [skip_python_tests] } { continue }
if { ![allow_python_tests] } { continue }
if { ![gdb_py_module_available "pygments"] } {
unsupported "pygments module not available"

View File

@ -16,7 +16,7 @@
# Test the flags within GDB that can be used to control how Python is
# initialized.
require !skip_python_tests
require allow_python_tests
# Return a list containing two directory paths for newly created home
# directories.

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile py-symbol.c py-symbol-2.c

View File

@ -18,7 +18,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile py-symbol.c

View File

@ -20,7 +20,7 @@
standard_testfile
require can_spawn_for_attach !skip_python_tests
require can_spawn_for_attach allow_python_tests
load_lib gdb-python.exp

View File

@ -16,7 +16,7 @@
# This file is part of the GDB testsuite. It tests the mechanism
# exposing values to Python.
require allow_cplus_tests !skip_python_tests
require allow_cplus_tests allow_python_tests
standard_testfile .cc
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \

View File

@ -21,7 +21,7 @@
load_lib gdb-python.exp
require !skip_python_tests
require allow_python_tests
standard_testfile

View File

@ -351,7 +351,7 @@ if { [build_inferior "${binfile}" "c"] == 0 } {
restart_gdb "${binfile}"
# Skip all tests if Python scripting is not enabled.
if { [skip_python_tests] } { continue }
if { ![allow_python_tests] } { continue }
gdb_test "python print (gdb.lookup_type ('char').objfile)" "None"

View File

@ -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 allow_cplus_tests !skip_python_tests
require allow_cplus_tests allow_python_tests
load_lib gdb-python.exp
load_lib cp-support.exp

Some files were not shown because too many files have changed in this diff Show More