From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2794 invoked by alias); 26 Mar 2014 05:49:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2778 invoked by uid 89); 26 Mar 2014 05:49:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 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; Wed, 26 Mar 2014 05:49:54 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WSgil-00071T-6V from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 25 Mar 2014 22:49:51 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 25 Mar 2014 22:49:51 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Tue, 25 Mar 2014 22:49:50 -0700 From: Yao Qi To: Subject: [PATCH] Skip tests on completion and readline when readline lib isn't used Date: Wed, 26 Mar 2014 05:49:00 -0000 Message-ID: <1395812833-17748-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00605.txt.bz2 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. Is it OK? gdb/testsuite: 2014-03-26 Yao Qi * 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. --- gdb/testsuite/gdb.ada/complete.exp | 23 +++--- gdb/testsuite/gdb.base/completion.exp | 123 ++++++++++++++++-------------- gdb/testsuite/gdb.base/filesym.exp | 6 ++ gdb/testsuite/gdb.base/macscp.exp | 119 +++++++++++++++--------------- gdb/testsuite/gdb.base/readline-ask.exp | 5 + gdb/testsuite/gdb.base/readline.exp | 5 + gdb/testsuite/gdb.python/py-cmd.exp | 18 +++-- gdb/testsuite/gdb.trace/tfile.exp | 8 +- gdb/testsuite/lib/gdb.exp | 16 ++++ 9 files changed, 187 insertions(+), 136 deletions(-) diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp index 5b52f73..1e1ebaa 100644 --- a/gdb/testsuite/gdb.ada/complete.exp +++ b/gdb/testsuite/gdb.ada/complete.exp @@ -176,15 +176,18 @@ test_gdb_complete "