The test-case gdb.tui/tuiterm-2.exp uses a tcl script gdb.tcl that uses tclsh
as its interpreter:
...
#!/usr/bin/env tclsh
...
I used tclsh because I assumed it was an existing dependency of
dejagnu/expect, but apparently [1] that's not the case.
IWBN to use some existing dependency instead.
Using expect instead of tclsh also works on my system, but looking in
/usr/bin/runtest I realized that someone might have a dejagnu setup with
a custom expect indicated by setting an env var EXPECT. So to find expect
we'd have to mimic whatever runtest is doing to find expect, or do:
...
$ runtest --version -v | grep "Expect binary"
...
using the appropriate runtest.
That sounds non-trivial and fragile, so simply use a shell script with /bin/sh
interpreter instead.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
[1] https://sourceware.org/pipermail/gdb-patches/2025-September/220736.html