diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-08 12:42:29 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-01-13 13:18:58 -0700 |
commit | b5075fb68d4b7a9ed1505150a395755260953809 (patch) | |
tree | 4d32d08c139c7145be62180506506a056c0756d7 /gdb/testsuite/lib | |
parent | e71b6502bffecbbdd99a791c6ee7545603bafbc1 (diff) | |
download | gdb-b5075fb68d4b7a9ed1505150a395755260953809.zip gdb-b5075fb68d4b7a9ed1505150a395755260953809.tar.gz gdb-b5075fb68d4b7a9ed1505150a395755260953809.tar.bz2 |
Rename to allow_tui_tests
This changes skip_tui_tests to invert the sense, and renames it to
allow_tui_tests. It also rewrites this function to use the output of
"gdb --configuration", and it adds a note about the state of the TUI
to that output.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/completion-support.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 17 | ||||
-rw-r--r-- | gdb/testsuite/lib/tuiterm.exp | 2 |
3 files changed, 6 insertions, 15 deletions
diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp index f47f1d3..bf9c5ad 100644 --- a/gdb/testsuite/lib/completion-support.exp +++ b/gdb/testsuite/lib/completion-support.exp @@ -555,7 +555,7 @@ proc test_gdb_completion_offers_commands {input_line} { # TUI adds additional commands to the possible completions, so we # need different patterns depending on whether or not it is enabled. - if { [skip_tui_tests] } { + if { ![allow_tui_tests] } { test_gdb_complete_multiple $input_line "" "" { "!" "actions" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 31f11b2..5359315 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2572,20 +2572,11 @@ gdb_caching_proc allow_dlmopen_tests { return $allow_dlmopen_tests } -# Return 1 if we should skip tui related tests. +# Return 1 if we should allow TUI-related tests. -proc skip_tui_tests {} { - global gdb_prompt - - gdb_test_multiple "help layout" "verify tui support" { - -re "Undefined command: \"layout\".*$gdb_prompt $" { - return 1 - } - -re "$gdb_prompt $" { - } - } - - return 0 +gdb_caching_proc allow_tui_tests { + set output [remote_exec host $::GDB --configuration] + return [expr {[string first "--enable-tui" $output] != -1}] } # Test files shall make sure all the test result lines in gdb.sum are diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index 591c4ca..c38ccbb 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -778,7 +778,7 @@ namespace eval Term { # 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]} { + if {![allow_tui_tests]} { return 0 } |