[OE-core] [PATCH 3/3] image/testimage: Rework auto image test execution

Richard Purdie richard.purdie at linuxfoundation.org
Wed Jun 20 09:54:58 UTC 2018


On Wed, 2018-06-20 at 08:47 +0800, ChenQi wrote:
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -487,7 +487,7 @@ HOSTTOOLS += " \
> >   "
> >   
> >   # Tools needed to run testimage runtime image testing
> > -HOSTTOOLS += "${@'ip ping ps scp ssh stty' if
> > (bb.data.inherits_class('testimage', d) or d.getVar('TEST_IMAGE')
> > == '1') else ''}"
> > +HOSTTOOLS += "${@'ip ping ps scp ssh stty' if
> > (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True,
> > False, d)) else ''}"
>
> After this change, testimage and testsdk is limited to be used via 
> IMAGE_CLASSES. Using INHERIT directly will cause commands missing
> when testing.
> e.g.
> INHERIT += "testimage"
> 
> Is it designed to be so?

Using INHERIT += "testimage" is bad form since it adds the testimage
task to things that it makes no sense with. Consider "bitbake bash -c
testimage" for example.

So yes, it was designed to do this, unfortunately it breaks the
autobuilder though.

I will likely want to fix the autobuilder not to do this and use the
new test code. We're about to change a lot of the autobuilder codebase
around to the new one so it probably makes sense to make that change
after we move to the new codebase.

For that reason I'll probably temporarily fix INHERIT of testimage to
work again but going forward, that support will be removed as it
doesn't make sense and IMAGE_CLASSES is the correct way to do it.

Does that make sense?

Cheers,

Richard






More information about the Openembedded-core mailing list