mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
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.
This commit is contained in:
@ -177,14 +177,16 @@ gdb_test "complete expr_test bar\." \
|
||||
"expr_test bar\.bc.*expr_test bar\.ij.*" \
|
||||
"Test completion through complete command"
|
||||
|
||||
set test "complete 'expr_test bar.i'"
|
||||
send_gdb "expr_test bar\.i\t\t"
|
||||
gdb_test_multiple "" "$test" {
|
||||
-re "expr_test bar\.ij \\\x07$" {
|
||||
send_gdb "\n"
|
||||
gdb_test_multiple "" $test {
|
||||
-re "invoked on = bar.ij.*$gdb_prompt $" {
|
||||
pass "$test"
|
||||
if { [readline_is_used] } {
|
||||
set test "complete 'expr_test bar.i'"
|
||||
send_gdb "expr_test bar\.i\t\t"
|
||||
gdb_test_multiple "" "$test" {
|
||||
-re "expr_test bar\.ij \\\x07$" {
|
||||
send_gdb "\n"
|
||||
gdb_test_multiple "" $test {
|
||||
-re "invoked on = bar.ij.*$gdb_prompt $" {
|
||||
pass "$test"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user