From 4ee9b0c53a8055b869dfe424846bc00eb0cd0c8f Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Wed, 19 Sep 2018 19:05:39 -0700 Subject: [PATCH] Skip GDB tab-completion tests if no readline. 2018-09-18 Sandra Loosemore gdb/testsuite/ * gdb.base/complete-empty.exp: Skip tab-completion tests if no readline. * gdb.base/utf8-identifiers.exp: Likewise. * gdb.cp/cpcompletion.exp: Likewise. * gdb.linespec/cpcompletion.exp: Likewise. * gdb.linespec/cpls-abi-tag.exp: Likewise. * gdb.linespec/cpls-ops.exp: Likewise. --- gdb/testsuite/ChangeLog | 10 ++++++++++ gdb/testsuite/gdb.base/complete-empty.exp | 8 ++++++++ gdb/testsuite/gdb.base/utf8-identifiers.exp | 8 ++++++++ gdb/testsuite/gdb.cp/cpcompletion.exp | 8 ++++++++ gdb/testsuite/gdb.linespec/cpcompletion.exp | 8 ++++++++ gdb/testsuite/gdb.linespec/cpls-abi-tag.exp | 8 ++++++++ gdb/testsuite/gdb.linespec/cpls-ops.exp | 8 ++++++++ 7 files changed, 58 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 37f252e49e0..53173c2f18c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2018-09-18 Sandra Loosemore + + * gdb.base/complete-empty.exp: Skip tab-completion tests if + no readline. + * gdb.base/utf8-identifiers.exp: Likewise. + * gdb.cp/cpcompletion.exp: Likewise. + * gdb.linespec/cpcompletion.exp: Likewise. + * gdb.linespec/cpls-abi-tag.exp: Likewise. + * gdb.linespec/cpls-ops.exp: Likewise. + 2018-09-19 Richard Bunt Chris January diff --git a/gdb/testsuite/gdb.base/complete-empty.exp b/gdb/testsuite/gdb.base/complete-empty.exp index 6a785388e79..57e5aaeb2e1 100644 --- a/gdb/testsuite/gdb.base/complete-empty.exp +++ b/gdb/testsuite/gdb.base/complete-empty.exp @@ -20,6 +20,14 @@ load_lib completion-support.exp gdb_exit gdb_start +# Tests below are about tab-completion, which doesn't work if readline +# library isn't used. Check it first. + +if { ![readline_is_used] } { + untested "no tab completion support without readline" + return -1 +} + # Start of tests. # Test TAB with no input. diff --git a/gdb/testsuite/gdb.base/utf8-identifiers.exp b/gdb/testsuite/gdb.base/utf8-identifiers.exp index 12fe3768e2a..a1cc1827b49 100644 --- a/gdb/testsuite/gdb.base/utf8-identifiers.exp +++ b/gdb/testsuite/gdb.base/utf8-identifiers.exp @@ -56,6 +56,14 @@ gdb_test "continue" \ # names getting in the way of completion. gdb_test_no_output "nosharedlibrary" +# Tests below are about tab-completion, which doesn't work if readline +# library isn't used. Check it first. + +if { ![readline_is_used] } { + untested "no tab completion support without readline" + return -1 +} + # Test linespec completion. # A unique completion. diff --git a/gdb/testsuite/gdb.cp/cpcompletion.exp b/gdb/testsuite/gdb.cp/cpcompletion.exp index 9ec3bbfa352..73aa3fd0b74 100644 --- a/gdb/testsuite/gdb.cp/cpcompletion.exp +++ b/gdb/testsuite/gdb.cp/cpcompletion.exp @@ -59,6 +59,14 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return -1 } +# Tests below are about tab-completion, which doesn't work if readline +# library isn't used. Check it first. + +if { ![readline_is_used] } { + untested "no tab completion support without readline" + return -1 +} + # Test that completion is restricted by class name (all methods) test_class_complete Foo "" "complete class methods" \ [list Foo Foofoo get_foo set_foo ~Foo] diff --git a/gdb/testsuite/gdb.linespec/cpcompletion.exp b/gdb/testsuite/gdb.linespec/cpcompletion.exp index d8aa5b2a496..48e1e0babb0 100644 --- a/gdb/testsuite/gdb.linespec/cpcompletion.exp +++ b/gdb/testsuite/gdb.linespec/cpcompletion.exp @@ -24,6 +24,14 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } +# Tests below are about tab-completion, which doesn't work if readline +# library isn't used. Check it first. + +if { ![readline_is_used] } { + untested "no tab completion support without readline" + return -1 +} + # Disable the completion limit for the whole testcase. gdb_test_no_output "set max-completions unlimited" diff --git a/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp b/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp index e188637bc07..b69f85fa77a 100644 --- a/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp +++ b/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp @@ -26,6 +26,14 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } +# Tests below are about tab-completion, which doesn't work if readline +# library isn't used. Check it first. + +if { ![readline_is_used] } { + untested "no tab completion support without readline" + return -1 +} + gdb_test_no_output "set max-completions unlimited" # Check that the explicit location completer manages to find the next diff --git a/gdb/testsuite/gdb.linespec/cpls-ops.exp b/gdb/testsuite/gdb.linespec/cpls-ops.exp index 355735eb417..cc66c858391 100644 --- a/gdb/testsuite/gdb.linespec/cpls-ops.exp +++ b/gdb/testsuite/gdb.linespec/cpls-ops.exp @@ -24,6 +24,14 @@ if {[prepare_for_testing "failed to prepare" $testfile \ return -1 } +# Tests below are about tab-completion, which doesn't work if readline +# library isn't used. Check it first. + +if { ![readline_is_used] } { + untested "no tab completion support without readline" + return -1 +} + gdb_test_no_output "set max-completions unlimited" # Check that the explicit location completer manages to find the next -- 2.30.2