From patchwork Wed Apr 24 07:54:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 239062 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 BAC3B2C007A for ; Wed, 24 Apr 2013 17:54:20 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 103814A100; Wed, 24 Apr 2013 09:54:19 +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 X7FO-7MGrCdL; Wed, 24 Apr 2013 09:54:18 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 424DE4A101; Wed, 24 Apr 2013 09:54:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E95D14A101 for ; Wed, 24 Apr 2013 09:54:12 +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 zhqgGaX++xlQ for ; Wed, 24 Apr 2013 09:54:11 +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-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by theia.denx.de (Postfix) with ESMTPS id 294014A100 for ; Wed, 24 Apr 2013 09:54:09 +0200 (CEST) Received: by mail-we0-f169.google.com with SMTP id p43so1398506wea.14 for ; Wed, 24 Apr 2013 00:54:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:reply-to:user-agent:mime-version:to :subject:x-enigmail-version:content-type:x-gm-message-state; bh=pT3PQljUawSMac0gL5v3ThuuS8iYfckUSI8aTajsjAo=; b=DBTAams0wf4dzDEXMaxxtoJJ+Ji1gWURTJqHVPiYrBUolf2xo52GqfTMB5ddBZkv8j eJtCL+AZPaqqEzEsBh1yed925NEQD02tzmvOal6fKoPKTufvM+9TfFejjJzgO+rDqaeS buWDQvuRGhSl4EPGCWD9uEYjmdEDBzyEaviNAa5R1SrSwypv9RqDrrgtjluWdY0SwZHi Eehof8wlfH6CvBcr4csN6tEJXaQAJUFVxJwAf7h+djTuQq1dvWwi74IrAoROQAe2H80Y oDMzrwcacGMkfpoyhOPFkWomwbTomT5T8x4as6ZtLK5kUsgUSo3ChNUd56u5gj6m7LAy 5Cjw== X-Received: by 10.180.80.3 with SMTP id n3mr42887692wix.20.1366790048872; Wed, 24 Apr 2013 00:54:08 -0700 (PDT) Received: from [192.168.0.100] (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id s2sm2356026wib.4.2013.04.24.00.54.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Apr 2013 00:54:08 -0700 (PDT) Message-ID: <51778F9E.9060003@monstr.eu> Date: Wed, 24 Apr 2013 09:54:06 +0200 From: Michal Simek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 MIME-Version: 1.0 To: "u-boot@lists.denx.de" , Simon Glass X-Enigmail-Version: 1.5.1 X-Gm-Message-State: ALoCoQkTDFdx+OQ0ABnWZhchVc1F55Wd6CftiqBR8Hv/2x23yqKp8XyANjs+BivxPLUnRYnl1Bna Subject: [U-Boot] patman and buildman experience X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list Reply-To: monstr@monstr.eu List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hi guys, yesterday I was talking to Simon on IRC about these two tools. Also it was the first day I have tried these tools. Simon asked me to share my experience with these tools with you and try to suggest improvement in it. First of all just let me say that I don't know python at all but maybe good time to look at it. 1. Let's start with last thing I have met with. Tom has gave me Reviewed-by for the whole my zynq series but I didn't found any option for patman to support this. It is not rare case and it should be IMHO supported. I past I was using git alias for that rtrini = filter-branch -f --msg-filter '\ cat && \ echo "Reviewed-by: Tom Rini \\"\ ' by calling git rtrini wd/master..HEAD all patches contained that line. With patman this options is not possible to use because at the end of emails are Series-changes. NOTE: have sent shortcut for adding Tom's shortcut to git-mailrc I see two ways how to fix it. 1. Support END for version changes 2. Add new Series-ack, Series-re, support to patman 2. The next minor thing which could be extend is default CC your colleagues in ~/.patman. I know it is just one line in commit message but why not to have this in default config. 3. Also will be good to list all options which can be added to ~/.patman with description what that options means. 4. Then I still have a problem with buildman with missing total_seconds support [u-boot]$ ./tools/buildman/buildman -b zynq zynq Building 16 commits for 2 boards (2 threads, 2 jobs per thread) Traceback (most recent call last): File "./tools/buildman/buildman", line 126, in control.DoBuildman(options, args) File "/mnt/projects/u-boot/tools/buildman/control.py", line 181, in DoBuildman options.show_errors, options.keep_outputs) File "/mnt/projects/u-boot/tools/buildman/builder.py", line 1428, in BuildBoards self.ProcessResult(None) File "/mnt/projects/u-boot/tools/buildman/builder.py", line 724, in ProcessResult self._AddTimestamp() File "/mnt/projects/u-boot/tools/buildman/builder.py", line 632, in _AddTimestamp seconds = delta.total_seconds() AttributeError: 'datetime.timedelta' object has no attribute 'total_seconds' [u-boot]$ python --version Python 2.7.4 I have found that it is new feature in python 2.7.4 http://docs.python.org/2/library/datetime.html#datetime.timedelta I have also confirmed that total_seconds is working based on example on that page. [u-boot]$ python Python 2.7.4 (default, Apr 23 2013, 13:20:21) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from datetime import timedelta >>> year = timedelta(days=365) >>> another_year = timedelta(weeks=40, days=84, hours=23, minutes=50, seconds=600) >>> year.total_seconds() 31536000.0 >>> Can you see what's wrong? Currently I have solved this by: 5. Buildman always add git clones to ../ location. I would welcome to be able to setup on ~/.buildman default location for these folders. Mostly /tmp folder or location on SSD. Anyway thanks Simon for these great tools. Michal diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index e426442..2d72243 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -629,7 +629,7 @@ class Builder: self._timestamps.append(now) count = len(self._timestamps) delta = self._timestamps[-1] - self._timestamps[0] - seconds = delta.total_seconds() + seconds = 1 # delta.total_seconds() # If we have enough data, estimate build period (time taken for a # single build) and therefore completion time.