summaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/gdb.exp
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2015-03-27 22:52:31 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2015-05-20 21:57:20 +0200
commitebe3b578523c72d47659df672fedae03a6894e72 (patch)
tree9e2dfa7ef200fb65f882417297f6ce322a2d08e8 /gdb/testsuite/lib/gdb.exp
parentfca6ae69c41882f5adfba05da7d932b7c8bc2153 (diff)
downloadbinutils-gdb-ebe3b578523c72d47659df672fedae03a6894e72.tar.gz
gdb/testsuite: New skip_tui_tests predicate.
Add a new predicate procedure to the gdb.exp library 'skip_tui_tests', which returns true if the tui is not compiled into gdb. Make use of this predicate in the gdb.base/tui-layout.exp test as an example. gdb/testsuite/ChangeLog: * lib/gdb.exp (skip_tui_tests): New proc. * gdb.base/tui-layout.exp: Check skip_tui_tests.
Diffstat (limited to 'gdb/testsuite/lib/gdb.exp')
-rw-r--r--gdb/testsuite/lib/gdb.exp16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 73e55e3ea1f..089a10c3c26 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1727,6 +1727,22 @@ proc skip_shlib_tests {} {
return 1
}
+# Return 1 if we should skip 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
+}
+
# Test files shall make sure all the test result lines in gdb.sum are
# unique in a test run, so that comparing the gdb.sum files of two
# test runs gives correct results. Test files that exercise