Simon reported [1] that test-case gdb.tui/tuiterm-2.exp fails with an ERROR
if tclsh is missing.
Fix this by checking that spawning the gdb.tcl script succeeds.
While we're at it, also add some missing cleanup related to the spawned process.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
[1] https://sourceware.org/pipermail/gdb-patches/2025-September/220736.html
}
}
-with_test_prefix "Unrecognized escape sequence" {
- spawn $srcdir/$subdir/gdb.tcl
- switch_gdb_spawn_id $spawn_id
+proc_with_prefix unrecognized_escape_sequence {} {
+ if { [spawn $::srcdir/$::subdir/gdb.tcl] == 0 } {
+ unsupported "cannot spawn gdb.tcl"
+ return
+ }
+ switch_gdb_spawn_id $spawn_id
Term::_setup 4 20
- save_vars timeout {
- set timeout 1
+ save_vars ::timeout {
+ set ::timeout 1
set line { 0 0 20 1 }
"echoed escape sequence"
}
Term::dump_screen
+
+ close $spawn_id
+ clear_gdb_spawn_id
}
+
+unrecognized_escape_sequence