From patchwork Wed Mar 26 05:47:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 289 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (caibbdcaabij.dreamhost.com [208.113.200.189]) by wilcox.dreamhost.com (Postfix) with ESMTP id 2C11F3600FE for ; Tue, 25 Mar 2014 22:50:01 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id D034951C1A76; Tue, 25 Mar 2014 22:50:00 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id AE80451C1A66 for ; Tue, 25 Mar 2014 22:50:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=FDrIABR2DlCLNBBP65wFSuFQt4EmM QuD2o4nzK9rZSY+u3qp62uAr14njjKG1tEjCLWykN9FPcEkR8HzSw9NbEe+O0NNX j1OeVMzr0gs2orS4cY3OnVmGa+eQR0C78/R2DP9RMZmMhj8ZidMTPFJ8fJoepErc kmAodEYOI6ka5A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=ZuQiw78rV2vjXX7xsIkFe2J8Z28=; b=tcP cP3OvGDF3NLjmEgMMnhwqZmwhlzhBxlnfBAoI195cILFLBKwBHVfhufH47Sj8V3X TyaDdmlhKMeJeNJHEug9WTQDzoaG+rZKVr2CuGwjh3uldvcqlT9OdyM5GD3Ge4U1 y6cTwPuorNp9WTnCYgth0r2VkktkfOnzU2Pszw60= 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-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 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 13:47:13 +0800 Message-ID: <1395812833-17748-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in 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 "