]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.tui/wrap-line.exp with --disable-tui
authorTom de Vries <tdevries@suse.de>
Wed, 31 May 2023 13:31:15 +0000 (15:31 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 31 May 2023 13:31:15 +0000 (15:31 +0200)
When running the test-case gdb.tui/wrap-line.exp with a build configured with
--disable-tui, we run into:
...
(gdb) PASS: gdb.tui/wrap-line.exp: width-hard-coded: set width 50
tui new-layout command-layout cmd 1^M
Undefined command: "tui".  Try "help".^M
(gdb) ERROR: Undefined command "tui new-layout command-layout cmd 1".
...

Fix this by guarding the command with allow_tui_tests.

Tested on x86_64-linux.

gdb/testsuite/gdb.tui/wrap-line.exp

index 4587517504cb60d5a8310d0763e83869e41ee842..2f0e4a5e795c6b230ab97473ce4e07e8d29085ec 100644 (file)
@@ -69,8 +69,10 @@ proc test_wrap { wrap_width } {
 
 # Test wrapping in both CLI and TUI.
 proc test_wrap_cli_tui { auto_detected_width } {
-    # Use a TUI layout with just a command window.
-    gdb_test_no_output "tui new-layout command-layout cmd 1"
+    if { [allow_tui_tests] } {
+       # Use a TUI layout with just a command window.
+       gdb_test_no_output "tui new-layout command-layout cmd 1"
+    }
 
     set gdb_width 0
     set readline_width 0