"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"
load_lib "ada.exp"
-require allow_ada_tests !skip_python_tests
+require allow_ada_tests allow_python_tests
standard_ada_testfile foo
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
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
" = \\(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"
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"
{$_shell_exitsignal = void} \
{$_shell_exitcode = 0} \
}
-if ![skip_python_tests] {
+if [allow_python_tests] {
append show_conv_list \
{
{$_memeq = <internal function _memeq>} \
standard_testfile
-require !skip_python_tests
+require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
return -1
"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__ ()"
]
}
- 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"
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"
standard_testfile .c
-require !skip_python_tests
+require allow_python_tests
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
# 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
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
"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"
}
"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"
}
return
}
-require !skip_python_tests
+require allow_python_tests
standard_testfile .cc
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
"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.
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]] } {
standard_testfile
-require !skip_python_tests
+require allow_python_tests
if { [prepare_for_testing "failed to prepare" \
${testfile} ${srcfile}] } {
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile .cc
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
# 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}] } {
# 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}] } {
# 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}] } {
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile .c -f1.c -f2.c
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile -main.cc
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
gdb_exit
gdb_start
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
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
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile py-connection.c
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
clean_restart
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
# Start with a fresh gdb.
gdb_exit
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"
# 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
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile py-evthreads.c
# 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
# 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
standard_testfile
-require !skip_python_tests
+require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
# 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
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile .cc
# 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 } {
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
standard_testfile
-require !skip_python_tests
+require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile amd64-py-framefilter-invalidarg.S
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
# Start with a fresh gdb.
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
# 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}] } {
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
# 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
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
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
-require !skip_python_tests
+require allow_python_tests
gdb_exit
if [mi_gdb_start] {
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
-require !skip_python_tests
+require allow_python_tests
gdb_exit
if [mi_gdb_start] {
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-require !skip_python_tests
+require allow_python_tests
#
# Start here
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
standard_testfile
-require !skip_python_tests
+require allow_python_tests
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
# Start with a fresh gdb.
clean_restart
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
standard_testfile
-require !skip_python_tests
+require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
standard_testfile
-require !skip_python_tests
+require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return -1
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
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
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile py-rbreak.c py-rbreak-func2.c
load_lib gdb-python.exp
-require allow_btrace_tests !skip_python_tests
+require allow_btrace_tests allow_python_tests
standard_testfile
# 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
# 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
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
# 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
return
}
-require !skip_python_tests
+require allow_python_tests
standard_testfile
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
load_lib gdb-python.exp
-require !skip_shlib_tests !skip_python_tests
+require !skip_shlib_tests allow_python_tests
standard_testfile
return -1
}
- if { [skip_python_tests] } { continue }
+ if { ![allow_python_tests] } { continue }
if { ![gdb_py_module_available "pygments"] } {
unsupported "pygments module not available"
# 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.
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile py-symbol.c py-symbol-2.c
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile py-symbol.c
standard_testfile
-require can_spawn_for_attach !skip_python_tests
+require can_spawn_for_attach allow_python_tests
load_lib gdb-python.exp
# 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 \
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
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"
# 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
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
# 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
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
standard_testfile
load_lib gdb-python.exp
-require allow_cplus_tests !skip_python_tests
+require allow_cplus_tests allow_python_tests
standard_testfile py-xmethods.cc
Term::clean_restart 24 80 $testfile
# Skip all tests if Python scripting is not enabled.
- if { [skip_python_tests] } { return 0 }
+ if { ![allow_python_tests] } { return 0 }
# Now source the python script.
gdb_test_no_output "source ${remote_python_file}" \
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
tuiterm_env
# Test a TUI window implemented in Python.
load_lib gdb-python.exp
-require !skip_python_tests
+require allow_python_tests
tuiterm_env
# This test doesn't care about the inferior.
load_lib gdb-python.exp
load_lib rust-support.exp
-require !skip_rust_tests !skip_python_tests
+require !skip_rust_tests allow_python_tests
standard_testfile .rs
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
gdb_test "print empty_enum_value.something" ""
load_lib gdb-python.exp
-if {[skip_python_tests]} {
+if {![allow_python_tests]} {
return
}
standard_testfile multi-ui-errors.c
-require allow_gdbserver_tests !skip_python_tests
+require allow_gdbserver_tests allow_python_tests
if {[build_executable "failed to prepare" ${testfile} \
${srcfile}] == -1} {
gdb_test "info connections" "${target} \| ${::gdbserver} - ${::binfile} \[^\r\n\]+"
- if { ![skip_python_tests] } {
+ if { [allow_python_tests] } {
gdb_test_no_output "python conn = gdb.selected_inferior().connection"
gdb_test "python print(conn.details)" "\| ${::gdbserver} - ${::binfile}"
}
"= $expected_value" \
"${number} thread local storage"
- if {![skip_python_tests]} {
+ if {[allow_python_tests]} {
gdb_test_no_output \
"python sym = gdb.lookup_symbol('a_thread_local')\[0\]" \
"${number} look up a_thread_local symbol"
return 0
}
-# Return a 1 for configurations that do not support Python scripting.
+# Return a 1 for configurations that support Python scripting.
-gdb_caching_proc skip_python_tests {
+gdb_caching_proc allow_python_tests {
set output [remote_exec host $::GDB --configuration]
- return [expr {[string first "--with-python" $output] == -1}]
+ return [expr {[string first "--with-python" $output] != -1}]
}
# Return a 1 if we should skip shared library tests.