[U-Boot] patman and buildman experience
Michal Simek
monstr at monstr.eu
Wed Apr 24 09:54:06 CEST 2013
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 \\<trini at ti.com\\>"\
'
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 <module>
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:
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.
5. Buildman always add git clones to ../<branch_name> 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
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130424/88a438b9/attachment.pgp>
More information about the U-Boot
mailing list