From patchwork Thu Aug 28 15:56:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 384233 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DE5E51400E0 for ; Fri, 29 Aug 2014 23:39:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8CF7EA76B1; Fri, 29 Aug 2014 15:39:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9UfT1YxVpyu8; Fri, 29 Aug 2014 15:39:00 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7202DA768F; Fri, 29 Aug 2014 15:38:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BF8EA768F for ; Fri, 29 Aug 2014 15:38:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Oak4H4k3NAFm for ; Fri, 29 Aug 2014 15:38:52 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pd0-f202.google.com (mail-pd0-f202.google.com [209.85.192.202]) by theia.denx.de (Postfix) with ESMTPS id 5AFF2A7675 for ; Fri, 29 Aug 2014 15:38:48 +0200 (CEST) Received: by mail-pd0-f202.google.com with SMTP id w10so186162pde.3 for ; Fri, 29 Aug 2014 06:38:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k7hRwl7wHLA39yBXtVqloRqsOCMTVbCObwyhESYVyuI=; b=jSEgRHPgS7ct+N9tl4JZsZ9d9S0Ayl5eJgQnjwSmuPpsWmP4qL79dnEqaL5eTsSt3+ WxIMAHukE5lXFvl3v7B/jjfBbFMeoXDMunLpBStDfZTBUB+wzROiTrDT4hAhcxccOrPG 5WGgmvR1owH6VWCO5LTe2NCrSQMK8YdyTqhrTJ8ngAN1JguZuoPaIqQpl6iLA/aj1bjm CLH+M6wKpdtjAACUp6FkLD6YFvv1EgLxkTXiJXkVboLK1MfsFow+wlxqLQG3+MDLgwOP lcmS/6rqzTXML8HUxOrSMds5QCrRQHTZ4GtooNhxNeQYF24+srfEQM1BUzkj5kikjVK6 VBFQ== X-Gm-Message-State: ALoCoQmxi3EbsJ7PoMADtjQZ0Kl+8A0iehtrC/dpRtAYRdtXqZ0FmjebINFAkNIjieWzakiWyGaC X-Received: by 10.70.37.41 with SMTP id v9mr5845732pdj.0.1409319521542; Fri, 29 Aug 2014 06:38:41 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id e55si4375yhb.3.2014.08.29.06.38.41 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Aug 2014 06:38:41 -0700 (PDT) Received: from kaki.bld.corp.google.com (kaki.bld.corp.google.com [172.29.216.32]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 0E6C45A5436; Thu, 28 Aug 2014 09:09:27 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id BE5D4221558; Thu, 28 Aug 2014 10:09:26 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 28 Aug 2014 09:56:20 -0600 Message-Id: <1409241384-8744-13-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1409241384-8744-1-git-send-email-sjg@chromium.org> References: <1409241384-8744-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH v2 12/16] buildman: Correct counting of build failures on retry X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de When a build is to be performed, buildman checks to see if it has already been done. In most cases it will not bother trying again. However, it was not reading the return code from the 'done' file, so if the result was a failure, it would not be counted. This depresses the 'failure' count stats that buildman prints in this case. Fix this bug by always reading the return code. Signed-off-by: Simon Glass --- Changes in v2: None tools/buildman/builderthread.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 0246375..261919f 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -138,16 +138,17 @@ class BuilderThread(threading.Thread): result.already_done = os.path.exists(done_file) will_build = (force_build or force_build_failures or not result.already_done) - if result.already_done and will_build: + if result.already_done: # Get the return code from that build and use it with open(done_file, 'r') as fd: result.return_code = int(fd.readline()) - err_file = self.builder.GetErrFile(commit_upto, brd.target) - if os.path.exists(err_file) and os.stat(err_file).st_size: - result.stderr = 'bad' - elif not force_build: - # The build passed, so no need to build it again - will_build = False + if will_build: + err_file = self.builder.GetErrFile(commit_upto, brd.target) + if os.path.exists(err_file) and os.stat(err_file).st_size: + result.stderr = 'bad' + elif not force_build: + # The build passed, so no need to build it again + will_build = False if will_build: # We are going to have to build it. First, get a toolchain