From patchwork Sun Aug 4 21:50:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 33959 Received: (qmail 97417 invoked by alias); 4 Aug 2019 21:50:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 97398 invoked by uid 89); 4 Aug 2019 21:50:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:0700 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 04 Aug 2019 21:50:42 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1huOOk-0003lz-BS from Sandra_Loosemore@mentor.com for gdb-patches@sourceware.org; Sun, 04 Aug 2019 14:50:38 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Sun, 4 Aug 2019 14:50:35 -0700 To: "gdb-patches@sourceware.org" From: Sandra Loosemore Subject: [testsuite, obvious] Add check for readline support to more GDB tab-completion tests. Message-ID: <97e9c585-5811-9dcd-78d1-c85e71a328bf@codesourcery.com> Date: Sun, 4 Aug 2019 15:50:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 This patch makes the new-ish completion-support.exp infrastructure skip tab-completion tests if there is no readline support. This fixes several ERRORs we've run into while testing on remote Windows host via ssh. I thought this was obvious enough to check in immediately since it is consistent with some previous patches I've contributed to do similar things, e.g. commits 4ee9b0c53a8055b869dfe424846bc00eb0cd0c8f 515b89b30c18dae6b91e57ec2dd336919bb4578d -Sandra commit 26655f53069a2f8a8ccbc6b60537149383d28be1 Author: Sandra Loosemore Date: Sun Aug 4 14:26:39 2019 -0700 Add check for readline support to more GDB tab-completion tests. 2019-08-04 Sandra Loosemore gdb/testsuite/ * lib/completion-support.exp (test_gdb_complete_none): Skip tab completion tests if no readline support. (test_gdb_complete_unique_re): Likewise. (test_gdb_complete_multiple): Likewise. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 91814f2..b4c834d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-08-04 Sandra Loosemore + + * lib/completion-support.exp (test_gdb_complete_none): Skip + tab completion tests if no readline support. + (test_gdb_complete_unique_re): Likewise. + (test_gdb_complete_multiple): Likewise. + 2019-08-03 Philippe Waroquiers * gdb.base/info_sources.exp: New file. diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp index abe48b4..e081b32 100644 --- a/gdb/testsuite/lib/completion-support.exp +++ b/gdb/testsuite/lib/completion-support.exp @@ -217,7 +217,9 @@ proc test_gdb_complete_cmd_multiple { cmd_prefix completion_word completion_list # Test that completing LINE completes to nothing. proc test_gdb_complete_none { input_line } { - test_gdb_complete_tab_none $input_line + if { [readline_is_used] } { + test_gdb_complete_tab_none $input_line + } test_gdb_complete_cmd_none $input_line } @@ -239,7 +241,9 @@ proc test_gdb_complete_none { input_line } { proc test_gdb_complete_unique_re { input_line complete_line_re {append_char " "} {max_completions 0}} { set append_char_re [string_to_regexp $append_char] - test_gdb_complete_tab_unique $input_line $complete_line_re $append_char_re + if { [readline_is_used] } { + test_gdb_complete_tab_unique $input_line $complete_line_re $append_char_re + } # Trim INPUT_LINE and COMPLETE LINE, for the case we're completing # a command with leading whitespace. Leading command whitespace @@ -282,7 +286,9 @@ proc test_gdb_complete_multiple { cmd_prefix completion_word add_completed_line completion_list {start_quote_char ""} {end_quote_char ""} {max_completions 0} } { - test_gdb_complete_tab_multiple "$cmd_prefix$completion_word" $add_completed_line $completion_list $max_completions + if { [readline_is_used] } { + test_gdb_complete_tab_multiple "$cmd_prefix$completion_word" $add_completed_line $completion_list $max_completions + } test_gdb_complete_cmd_multiple $cmd_prefix $completion_word $completion_list $start_quote_char $end_quote_char $max_completions }