aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/gdb.exp
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-08 12:42:29 -0700
committerTom Tromey <tom@tromey.com>2023-01-13 13:18:58 -0700
commitb5075fb68d4b7a9ed1505150a395755260953809 (patch)
tree4d32d08c139c7145be62180506506a056c0756d7 /gdb/testsuite/lib/gdb.exp
parente71b6502bffecbbdd99a791c6ee7545603bafbc1 (diff)
downloadgdb-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/gdb.exp')
-rw-r--r--gdb/testsuite/lib/gdb.exp17
1 files changed, 4 insertions, 13 deletions
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