]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.multi/pending-bp.exp without python support
authorTom de Vries <tdevries@suse.de>
Sat, 19 Jul 2025 15:08:44 +0000 (17:08 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 19 Jul 2025 15:08:44 +0000 (17:08 +0200)
With a gdb build without python support and test-case
gdb.multi/pending-bp.exp, I run into:
...
(gdb) python bp=[b for b in gdb.breakpoints() if b.number == 5][0]^M
Python scripting is not supported in this copy of GDB.^M
(gdb) FAIL: $exp: py_test_toggle_thread: find Python gdb.Breakpoint object
...

Fix this by requiring python support for part of the test-case.

Tested on aarch64-linux.

Reviewed-By: Keith Seitz <keiths@redhat.com>
gdb/testsuite/gdb.multi/pending-bp.exp

index 1cd1cfb0b881e6ee32714f262b9faf648a50a6c9..2458cd798c7c38ea87297c86e7f77f6177208924 100644 (file)
@@ -328,5 +328,7 @@ proc_with_prefix py_test_clear_thread {} {
 # Run all the tests.
 test_no_inf_display
 test_pending_toggle
-py_test_toggle_thread
-py_test_clear_thread
+if { [allow_python_tests] } {
+    py_test_toggle_thread
+    py_test_clear_thread
+}