]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.tui/tui-layout.exp for remote host
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)
When running test-case gdb.tui/tui-layout.exp with host board
local-remote-host-notty and target board native-gdbserver, I get:
...
FAIL: gdb.tui/tui-layout.exp: terminal=dumb: execution=false: layout=asm: \
  layout asm (timeout)
...

The problem is that the test-case expects that the default "setenv TERM dumb"
has effect, which is not the case for remote host.

Fix this by skipping the test for remote host.

Tested on x86_64-linux.

gdb/testsuite/gdb.tui/tui-layout.exp

index c7fdb1b0c0ad6fe505e6c6e6822c396ec2dd2b5e..13823387e7247cd0caea59bff1e2fde2136f975f 100644 (file)
@@ -61,6 +61,10 @@ proc test_layout_or_focus {layout_name terminal execution} {
     }
 
     if {$dumb_terminal} {
+       if { [is_remote host] } {
+           # setenv TERM dummy has no effect on remote host.
+           return
+       }
        gdb_test "layout $layout_name" \
            "Cannot enable the TUI: terminal doesn't support cursor addressing \\\[TERM=dumb\\\]"
     } else {