[binutils-gdb] [gdb/testsuite] Require allow_python_tests in gdb.cp/pretty-print.exp

Tom de Vries via Gdb-cvs <[email protected]> Mon, 3 Aug 2026 18:36:39 +0000 (GMT)
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Df792df958774=
98ef71fe8f2849b1790e56baf4ab

commit f792df95877498ef71fe8f2849b1790e56baf4ab
Author: Tom de Vries <[email protected]>
Date:   Mon Aug 3 20:36:35 2026 +0200

    [gdb/testsuite] Require allow_python_tests in gdb.cp/pretty-print.exp
   =20
    I build gdb without python support, and ran into:
    ...
    (gdb) source $src/gdb/testsuite/gdb.cp/pretty-print.py
    $src/gdb/testsuite/gdb.cp/pretty-print.py:18: Error in sourced command =
file:
    Undefined command: "import".  Try "help".
    (gdb) ERROR: Undefined command "source $src/gdb/testsuite/gdb.cp/pretty=
-print.py".
    ...
   =20
    Fix this by requiring allow_python_tests.

Diff:
---
 gdb/testsuite/gdb.cp/pretty-print.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/gdb.cp/pretty-print.exp b/gdb/testsuite/gdb.cp/p=
retty-print.exp
index eaeffc6c5f6..76c3b715668 100644
--- a/gdb/testsuite/gdb.cp/pretty-print.exp
+++ b/gdb/testsuite/gdb.cp/pretty-print.exp
@@ -16,6 +16,8 @@
 # Print std::string::npos using c++ pretty-printer.  Todo: convert this to=
 a
 # DWARF assembly test-case, such that the regression test also works for c=
lang.
=20
+require allow_python_tests
+
 standard_testfile .cc
=20
 set opts {}