public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] [gdb/testsuite] Fix gdb.tui/wrap-line.exp with --disable-tui
@ 2023-05-31 13:31 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-05-31 13:31 UTC (permalink / raw)
  To: gdb-patches

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 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.tui/wrap-line.exp b/gdb/testsuite/gdb.tui/wrap-line.exp
index 4587517504c..2f0e4a5e795 100644
--- a/gdb/testsuite/gdb.tui/wrap-line.exp
+++ b/gdb/testsuite/gdb.tui/wrap-line.exp
@@ -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

base-commit: 6e9bcaad3fd8f7635afb9fa7013762da2eeff8e5
-- 
2.35.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-31 13:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-31 13:31 [pushed] [gdb/testsuite] Fix gdb.tui/wrap-line.exp with --disable-tui Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).