[tbot] U-Boot Building

Heiko Schocher hs at denx.de
Tue Dec 4 09:54:40 UTC 2018


Hello Harald,

Am 04.12.2018 um 10:40 schrieb Harald Seiler:
> Hello!
> 
> As mentioned in a previous mail, the current implementation for
> building U-Boot is quite rigid and unwieldy in some cases
> (I have included the relevant quotation in the end of this mail).
> 
> This means, the relevant testcases need quite some overhaul.  Before
> hacking some solution, that works for me, I thought it might make
> sense to collect the use-cases you all have so the future implementation
> supports them all.
> 
> To start off, I will list my personal ones.  Please extend this list
> as necessary:
> 
> * Completely fresh build:
> 	(Example: CI, nightly tests)
> 	clone/fetch; clean; checkout rev; patch; make
> * Rebuild from existing tree, without using existing artifacts:
> 	(Example: during a bisect)
> 	clean; make
> * Rebuild from existing dirty tree:
> 	(Example: during development, debugging)
> 	make
> 
> In my opinion, tbot should behave like this: In any case, if no
> repo exists yet, it should clone upstream and try building with
> that (as in the first case). If a repo exists already it will use
> the specified behaviour.
> 
> What are your opinions?

Seems to fit for all my needs too..

> One open question: Do you want/need to apply patches during a bisect?

Yes, I had this also in my old implementation.

bye,
Heiko
> 
> The triggering issue:
>>     Just a few days ago, I was writing a testcase to bisect U-Boot.  The current
>> design for building U-Boot in tbot is one that is strictly configured (and does not
>> really use composition).  The issue arose that the `uboot.build` testcase internally
>> checks out the U-Boot repository.  During a git-bisect, this will make troubles because
>> we do not want to checkout the current master but build on the revision the bisect
>> put us on.  How to solve this?  Well, you can't.  You have to change the `uboot.build`
>> testcase.  Luckily you can do this without actually touching tbot code, but the solution
>> is still less than ideal:
>>
>>          class BuildInfo(getattr(tbot.selectable.UBootMachine, "build")):
>>              def checkout(self, clean):
>>                  return super().checkout(False)
>>
>>          builddir = uboot.build(
>>              bh,
>>              BuildInfo,
>>              clean=True,
>>          )
>>
>> This code overwrites the checkout method in the U-Boot build-info (which is a composable
>> part of this config!) and tells tbot to always do a dirty checkout, even if we supply
>> clean=True to `uboot.build`.  This is arguably not good programming and definitely not
>> pythonic in any way.  If the U-Boot build was more composable instead of this config-approach,
>> this issue would never arise.

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the tbot mailing list