[pushed,gdb/testsuite] Require python in gdb.dap/basic-dap.exp

Message ID 20230221114741.22860-1-tdevries@suse.de
State Committed
Headers
Series [pushed,gdb/testsuite] Require python in gdb.dap/basic-dap.exp |

Commit Message

Tom de Vries Feb. 21, 2023, 11:47 a.m. UTC
  When running test-case gdb.dap/basic-dap.exp with a gdb without python
support, I run into:
...
builtin_spawn gdb -nw -nx -iex set height 0 -iex set width 0 \
  -data-directory data-directory -iex set debug dap-log-file dap.log.1 -q \
  -i=dap
>>> {"seq": 1, "type": "request", "command": "initialize"}
Interpreter `dap' unrecognized
ERROR: eof reading json header
...

Fix this by requiring python in the test-case.

Tested on x86_64-linux, both with a gdb without and with python.
---
 gdb/testsuite/gdb.dap/basic-dap.exp | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 1fafeaac8503eea2f61c3a35f0eef183b7e7cc65
  

Patch

diff --git a/gdb/testsuite/gdb.dap/basic-dap.exp b/gdb/testsuite/gdb.dap/basic-dap.exp
index 5303e943320..f4f25154770 100644
--- a/gdb/testsuite/gdb.dap/basic-dap.exp
+++ b/gdb/testsuite/gdb.dap/basic-dap.exp
@@ -15,6 +15,8 @@ 
 
 # Basic DAP test.
 
+require allow_python_tests
+
 load_lib dap-support.exp
 
 standard_testfile