Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [patch, testsuite] skip tab-completion tests if no readline
Date: Wed, 19 Sep 2018 04:23:00 -0000	[thread overview]
Message-ID: <ae3d90cf-0096-18fc-a004-68c6888c50b7@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

I found a bunch of borked tab-completion tests when running tests on a 
remote Windows host, where the input stream is not a tty and has no 
readline support.  I've copied the test for readline support verbatim 
from the older gdb.base/completion.exp testcase into these newer 
testcases.  OK to commit?

-Sandra

[-- Attachment #2: gdb-tab.patch --]
[-- Type: text/x-patch, Size: 4523 bytes --]

commit b4262306c3d11c87c11c873d3bd6065fcb6b0625
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Tue Sep 18 21:10:55 2018 -0700

    Skip GDB tab-completion tests if no readline.
    
    2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
    
    	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.

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 701d979..6ec2f86 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
+
+        * 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-18  Sergio Durigan Junior  <sergiodj@redhat.com>
 
 	* gdb.arch/amd64-invalid-stack-top.exp: Expect optional
diff --git a/gdb/testsuite/gdb.base/complete-empty.exp b/gdb/testsuite/gdb.base/complete-empty.exp
index 6a78538..c97b1fd 100644
--- a/gdb/testsuite/gdb.base/complete-empty.exp
+++ b/gdb/testsuite/gdb.base/complete-empty.exp
@@ -15,6 +15,13 @@
 
 # This file is part of the gdb testsuite.
 
+# Tests below are about tab-completion, which doesn't work if readline
+# library isn't used.  Check it first.
+
+if { ![readline_is_used] } {
+    return -1
+}
+
 load_lib completion-support.exp
 
 gdb_exit
diff --git a/gdb/testsuite/gdb.base/utf8-identifiers.exp b/gdb/testsuite/gdb.base/utf8-identifiers.exp
index 12fe376..6afc884 100644
--- a/gdb/testsuite/gdb.base/utf8-identifiers.exp
+++ b/gdb/testsuite/gdb.base/utf8-identifiers.exp
@@ -56,6 +56,13 @@ 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] } {
+    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 9ec3bbf..0a5e804 100644
--- a/gdb/testsuite/gdb.cp/cpcompletion.exp
+++ b/gdb/testsuite/gdb.cp/cpcompletion.exp
@@ -15,6 +15,13 @@
 
 # This file is part of the gdb testsuite.
 
+# Tests below are about tab-completion, which doesn't work if readline
+# library isn't used.  Check it first.
+
+if { ![readline_is_used] } {
+    return -1
+}
+
 load_lib completion-support.exp
 
 # A helper procedure to test location completions restricted by
diff --git a/gdb/testsuite/gdb.linespec/cpcompletion.exp b/gdb/testsuite/gdb.linespec/cpcompletion.exp
index d8aa5b2..1fc5390 100644
--- a/gdb/testsuite/gdb.linespec/cpcompletion.exp
+++ b/gdb/testsuite/gdb.linespec/cpcompletion.exp
@@ -15,6 +15,13 @@
 
 # This file is part of the gdb testsuite.
 
+# Tests below are about tab-completion, which doesn't work if readline
+# library isn't used.  Check it first.
+
+if { ![readline_is_used] } {
+    return -1
+}
+
 load_lib completion-support.exp
 
 standard_testfile cpls.cc cpls2.cc cpls-hyphen.cc
diff --git a/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp b/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp
index e188637..a3a2e56 100644
--- a/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp
+++ b/gdb/testsuite/gdb.linespec/cpls-abi-tag.exp
@@ -17,6 +17,13 @@
 
 # Test ABI tag support in linespecs.
 
+# Tests below are about tab-completion, which doesn't work if readline
+# library isn't used.  Check it first.
+
+if { ![readline_is_used] } {
+    return -1
+}
+
 load_lib completion-support.exp
 
 standard_testfile cpls-abi-tag.cc
diff --git a/gdb/testsuite/gdb.linespec/cpls-ops.exp b/gdb/testsuite/gdb.linespec/cpls-ops.exp
index 355735e..ccd89a3 100644
--- a/gdb/testsuite/gdb.linespec/cpls-ops.exp
+++ b/gdb/testsuite/gdb.linespec/cpls-ops.exp
@@ -15,6 +15,13 @@
 
 # This file is part of the gdb testsuite.
 
+# Tests below are about tab-completion, which doesn't work if readline
+# library isn't used.  Check it first.
+
+if { ![readline_is_used] } {
+    return -1
+}
+
 load_lib completion-support.exp
 
 standard_testfile cpls-ops.cc

             reply	other threads:[~2018-09-19  4:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19  4:23 Sandra Loosemore [this message]
2018-09-19 12:52 ` Tom Tromey
2018-09-19 12:57 ` Tom Tromey
2018-09-20  2:18   ` Sandra Loosemore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae3d90cf-0096-18fc-a004-68c6888c50b7@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox