[gdb/testsuite] Require ![is_remote host] for TUI
authorTom de Vries <tdevries@suse.de>
Mon, 13 Mar 2023 16:20:09 +0000 (17:20 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 13 Mar 2023 16:20:09 +0000 (17:20 +0100)
commit72f160d012233b7a322cd626e11f787f501beee2
tree5ae94f3e21cc0b4b8a07cbeddfd94fddd95c5ab3
parent6b81ded4876cb836e5fd7d8bc2459fef99dcac70
[gdb/testsuite] Require ![is_remote host] for TUI

When running test-case gdb.tui/corefile-run.exp with both host and target board
local-remote-host-native.exp, we run into:
...
FAIL: gdb.tui/corefile-run.exp: load corefile
...
while this passes with USE_TUI=0.

The problem is that the TUI setup code uses "setenv TERM ansi", which has no
effect on remote host.

I can confirm this analysis by working around this problem in
local-remote-host-native.exp like this:
...
-    spawn $RSH -t -l $username $remote $cmd
+    spawn $RSH -t -l $username $remote "export TERM=ansi; $cmd"
...

For now, simply make TUI unsupported for remote host, by returning 0 in
prepare_for_tui.

Tested on x86_64-linux.
gdb/testsuite/lib/tuiterm.exp