gdb/testsuite/tui: Split enter_tui into two procs
Split Term::enter_tui into two procedures, a core which does the setup, but doesn't actually enable tui mode, and the old enter_tui that calls the new core, and then enables tui mode. This is going to be useful in a later commit. gdb/testsuite/ChangeLog: * lib/tuiterm.exp (Term::prepare_for_tui): New proc. (Term::enter_tui): Use Term::prepare_for_tui. Change-Id: I501dfb2ddaa4a4e7246a5ad319ab428e4f42b3af
This commit is contained in:
parent
63ffd7c913
commit
b40aa28fb5
|
@ -1,3 +1,8 @@
|
||||||
|
2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
|
* lib/tuiterm.exp (Term::prepare_for_tui): New proc.
|
||||||
|
(Term::enter_tui): Use Term::prepare_for_tui.
|
||||||
|
|
||||||
2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
|
2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
* lib/tuiterm.exp (Term::dump_screen): Always dump the screen when
|
* lib/tuiterm.exp (Term::dump_screen): Always dump the screen when
|
||||||
|
|
|
@ -462,15 +462,25 @@ namespace eval Term {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start the TUI. Returns 1 on success, 0 if TUI tests should be
|
# Setup ready for starting the tui, but don't actually start it.
|
||||||
# skipped.
|
# Returns 1 on success, 0 if TUI tests should be skipped.
|
||||||
proc enter_tui {} {
|
proc prepare_for_tui {} {
|
||||||
if {[skip_tui_tests]} {
|
if {[skip_tui_tests]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_test_no_output "set tui border-kind ascii"
|
gdb_test_no_output "set tui border-kind ascii"
|
||||||
gdb_test_no_output "maint set tui-resize-message on"
|
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"
|
command "tui enable"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue