aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/readline.exp
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-03-19 10:16:35 +0800
committerYao Qi <yao@codesourcery.com>2014-03-26 21:11:08 +0800
commit0d4d0e772ac36d169d21951c46b0778ae7fa8d53 (patch)
tree909fa2d2ba498ccc12a88f12761fa3e63d7a26c9 /gdb/testsuite/gdb.base/readline.exp
parent29361eee1499fa208baf06df5c6aa1ef4c1b2516 (diff)
downloadgdb-0d4d0e772ac36d169d21951c46b0778ae7fa8d53.zip
gdb-0d4d0e772ac36d169d21951c46b0778ae7fa8d53.tar.gz
gdb-0d4d0e772ac36d169d21951c46b0778ae7fa8d53.tar.bz2
Skip tests on completion and readline when readline lib isn't used
The completion feature and other features on readline depend on the readline library. However, readline library is not always used, for example, running testsuite like make check RUNTESTFLAGS="--host_board=local-remote-host" the input stream is not a tty, and GDB doesn't use readline library as a result. This patch is to skip tests on completion and readline if 'show editing' is off, which means readline isn't used. Note that some tests in gdb.base/completion.exp test command complete, which isn't related to readline, so these tests aren't affected by readline library. This patch also moves these tests up, run them unconditionally, and run the rest if readline library is used. gdb/testsuite: 2014-03-26 Yao Qi <yao@codesourcery.com> * lib/gdb.exp (readline_is_used): New proc. * gdb.base/completion.exp: Move tests on command complete up. Skip the rest of tests if readline is not used. * gdb.ada/complete.exp: Skp the test if readline is not used. * gdb.base/filesym.exp: Likewise. * gdb.base/macscp.exp: Likewise. * gdb.base/readline-ask.exp: Likewise. * gdb.base/readline.exp: Likewise. * gdb.python/py-cmd.exp: Likewise. * gdb.trace/tfile.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.base/readline.exp')
-rw-r--r--gdb/testsuite/gdb.base/readline.exp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/readline.exp b/gdb/testsuite/gdb.base/readline.exp
index 3c7d4c1..ef7fa13 100644
--- a/gdb/testsuite/gdb.base/readline.exp
+++ b/gdb/testsuite/gdb.base/readline.exp
@@ -145,6 +145,11 @@ proc operate_and_get_next {name args} {
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
+if { ![readline_is_used] } {
+ unsupported "readline isn't used."
+ return -1
+}
+
set oldtimeout1 $timeout
set timeout 30