From patchwork Mon May 19 18:07:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 350365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 9F7C0140082 for ; Tue, 20 May 2014 04:07:42 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=IejM0ppMxHYqiQLu eHGV0HbwM4o7W2tvjj4eufbpqmhcraWwvhYZzQRPmBK3xIoCh9TU0MQRgGNpWjyp ExaFudwt46J0udpTvT/SbOSeBTtWMBe+QgIex/l4qVc9IJYkCV99+D9jpBDfXxTy flDlJwshlDVH3qFf7nQqrEDJ3hE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=zXNwSPxO33Kcc7pokdDIg5 XQbB8=; b=Cg6Sl5NhHZ8utkRNEd3VIZU3V17VlpldDmbWafb3MtQ+iNxMHOxm+/ Vf3VJcj9PFDeSQmGAOR475ZEgFXmbpdqzUvmIK6EVEt11XK8ybgQQQvTNIWmW13O A/D5Qx4U6dLe+TjuDy9HiA0VchXGwgcvkVs2TT1lx8RlgqTsWi2pw= Received: (qmail 29293 invoked by alias); 19 May 2014 18:07:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 29277 invoked by uid 89); 19 May 2014 18:07:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f176.google.com Received: from mail-wi0-f176.google.com (HELO mail-wi0-f176.google.com) (209.85.212.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 19 May 2014 18:07:32 +0000 Received: by mail-wi0-f176.google.com with SMTP id n15so4609221wiw.15 for ; Mon, 19 May 2014 11:07:29 -0700 (PDT) X-Received: by 10.194.60.114 with SMTP id g18mr4492760wjr.61.1400522849697; Mon, 19 May 2014 11:07:29 -0700 (PDT) Received: from localhost ([2.26.169.52]) by mx.google.com with ESMTPSA id fu10sm16272165wib.11.2014.05.19.11.07.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 May 2014 11:07:29 -0700 (PDT) From: Richard Sandiford To: Charles Baylis Mail-Followup-To: Charles Baylis , GCC Patches , rdsandiford@googlemail.com Cc: GCC Patches Subject: Re: RFA: speeding up dg-extract-results.sh References: <878utfe5g0.fsf@talisman.default> Date: Mon, 19 May 2014 19:07:28 +0100 In-Reply-To: (Charles Baylis's message of "Mon, 19 May 2014 18:46:19 +0100") Message-ID: <874n0llk0v.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Charles Baylis writes: > On 13 February 2014 09:18, Richard Sandiford wrote: >> This patch tries to reduce that by providing an alternative single-script >> version. I was torn between Python and Tcl, but given how most people >> tend to react to Tcl, I thought I'd better go for Python. I wouldn't >> mind rewriting it in Tcl if that seems better though, not least because >> expect is already a prerequisite. > > This seems to have broken parallel "make check". I normally use "make > -j8 check" but now that results in empty *.sum and *.log files. > > This is caused because the python script aborts with a fatal error > ('saw test result before harness name') when it encounters this > warning: > WARNING: Assuming target board is the local machine (which is probably wrong). > You may need to set your DEJAGNU environment variable. > > In my configuration (arm-unknown-linux-gnueabihf target, > x86_64-linux-gnu host, running tests using qemu and binfmt_misc) the > warning is bogus, so I think that make check should succeed despite > it. > > I've attached a sample file which triggers the error with this command > $ /contrib/dg-extract-results.sh gcc.sum.sep > gcc.sum.sep: saw test result before harness name > > The attached patch is a hack, intended for demonstration purposes. It > isn't ideal as the 'You may need to set...' line is lost, but it > allows my testing to work. Sorry for the breakage. I wanted to make the script as picky as I could get away with though, so that results aren't lost accidentally. Could you try the attached? Thanks, Richard Index: contrib/dg-extract-results.py =================================================================== --- contrib/dg-extract-results.py (revision 210601) +++ contrib/dg-extract-results.py (working copy) @@ -264,8 +264,12 @@ # the harness segment, so that if a run for a particular harness # has been split up, we can reassemble the individual segments # in a sensible order. + # + # dejagnu sometimes issues warnings about the testing environment + # before running any tests. Treat these as part of the header + # rather than as a test result. match = self.result_re.match (line) - if match: + if match and (harness or not line.startswith ('WARNING:')): if not harness: self.fatal (filename, 'saw test result before harness name') name = match.group (2)