gdb/testsuite/tui: Split enter_tui into two procs
[deliverable/binutils-gdb.git] / gdb / testsuite / lib / tuiterm.exp
index 36e034a36390fab1891ee4d0ecca4f48703e9999..9ac599b6f2d333cc28d06d32f743a8254c80c058 100644 (file)
@@ -462,15 +462,25 @@ namespace eval Term {
        }
     }
 
-    # Start the TUI.  Returns 1 on success, 0 if TUI tests should be
-    # skipped.
-    proc enter_tui {} {
+    # Setup ready for starting the tui, but don't actually start it.
+    # Returns 1 on success, 0 if TUI tests should be skipped.
+    proc prepare_for_tui {} {
        if {[skip_tui_tests]} {
            return 0
        }
 
        gdb_test_no_output "set tui border-kind ascii"
        gdb_test_no_output "maint set tui-resize-message on"
+       return 1
+    }
+
+    # Start the TUI.  Returns 1 on success, 0 if TUI tests should be
+    # skipped.
+    proc enter_tui {} {
+       if {![prepare_for_tui]} {
+           return 0
+       }
+
        command "tui enable"
        return 1
     }
This page took 0.033616 seconds and 4 git commands to generate.