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".
...
Fix this by requiring allow_python_tests.
# 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 clang.
+require allow_python_tests
+
standard_testfile .cc
set opts {}