Message ID | 20181016232143.5016-1-anibal.limon@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU | expand |
On Tue, 2018-10-16 at 18:21 -0500, Aníbal Limón wrote: > When use simpleremote target the flash/boot process is executed > manually, the IMAGE_FSTYPES validation is only needed when execute > testimage against qemu. > > The supported_fstypes comes from oeqa.core.target.qemu module. > > Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> > --- > meta/classes/testimage.bbclass | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass > index 2642a722e7..734cb7caae 100644 > --- a/meta/classes/testimage.bbclass > +++ b/meta/classes/testimage.bbclass > @@ -194,12 +194,13 @@ def testimage_main(d): > machine = d.getVar("MACHINE") > > # Get rootfs > - fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ') > - if fs in supported_fstypes] > - if not fstypes: > - bb.fatal('Unsupported image type built. Add a comptible image to ' > - 'IMAGE_FSTYPES. Supported types: %s' % > - ', '.join(supported_fstypes)) > + fstypes = d.getVar('IMAGE_FSTYPES') > + if d.getVar("TEST_TARGET") == "qemu": > + fstypes = [fs for fs in fstypes if fs in supported_fstypes] > + if not fstypes: > + bb.fatal('Unsupported image type built. Add a comptible image to ' > + 'IMAGE_FSTYPES. Supported types: %s' % > + ', '.join(supported_fstypes)) > rootfs = '%s.%s' % (image_name, fstypes[0]) > > # Get tmpdir (not really used, just for compatibility) This causes the autobuilder to break and there is a bug in the logic above: https://autobuilder.yoctoproject.org/typhoon/#/builders/32/builds/128/steps/7/logs/step1c (one of many failures as everything broke) Cheers, Richard
On Sat, 20 Oct 2018 at 02:11, <richard.purdie@linuxfoundation.org> wrote: > On Tue, 2018-10-16 at 18:21 -0500, Aníbal Limón wrote: > > When use simpleremote target the flash/boot process is executed > > manually, the IMAGE_FSTYPES validation is only needed when execute > > testimage against qemu. > > > > The supported_fstypes comes from oeqa.core.target.qemu module. > > > > Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> > > --- > > meta/classes/testimage.bbclass | 13 +++++++------ > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/meta/classes/testimage.bbclass > b/meta/classes/testimage.bbclass > > index 2642a722e7..734cb7caae 100644 > > --- a/meta/classes/testimage.bbclass > > +++ b/meta/classes/testimage.bbclass > > @@ -194,12 +194,13 @@ def testimage_main(d): > > machine = d.getVar("MACHINE") > > > > # Get rootfs > > - fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ') > > - if fs in supported_fstypes] > > - if not fstypes: > > - bb.fatal('Unsupported image type built. Add a comptible image > to ' > > - 'IMAGE_FSTYPES. Supported types: %s' % > > - ', '.join(supported_fstypes)) > > + fstypes = d.getVar('IMAGE_FSTYPES') > > + if d.getVar("TEST_TARGET") == "qemu": > > + fstypes = [fs for fs in fstypes if fs in supported_fstypes] > > + if not fstypes: > > + bb.fatal('Unsupported image type built. Add a comptible > image to ' > > + 'IMAGE_FSTYPES. Supported types: %s' % > > + ', '.join(supported_fstypes)) > > rootfs = '%s.%s' % (image_name, fstypes[0]) > > > > # Get tmpdir (not really used, just for compatibility) > > This causes the autobuilder to break and there is a bug in the logic > above: > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/32/builds/128/steps/7/logs/step1c I'm not seeing this error, I executed testimage in qemuarm and qemux86, I'm looking at the configuration but should not fail because I added only a conditional to filter only when the target is qemu. Regards, Anibal > > > (one of many failures as everything broke) > > Cheers, > > Richard > > > <div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, 20 Oct 2018 at 02:11, <<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 2018-10-16 at 18:21 -0500, Aníbal Limón wrote:<br> > When use simpleremote target the flash/boot process is executed<br> > manually, the IMAGE_FSTYPES validation is only needed when execute<br> > testimage against qemu.<br> > <br> > The supported_fstypes comes from oeqa.core.target.qemu module.<br> > <br> > Signed-off-by: Aníbal Limón <<a href="mailto:anibal.limon@linaro.org" target="_blank">anibal.limon@linaro.org</a>><br> > ---<br> > meta/classes/testimage.bbclass | 13 +++++++------<br> > 1 file changed, 7 insertions(+), 6 deletions(-)<br> > <br> > diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass<br> > index 2642a722e7..734cb7caae 100644<br> > --- a/meta/classes/testimage.bbclass<br> > +++ b/meta/classes/testimage.bbclass<br> > @@ -194,12 +194,13 @@ def testimage_main(d):<br> > machine = d.getVar("MACHINE")<br> > <br> > # Get rootfs<br> > - fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ')<br> > - if fs in supported_fstypes]<br> > - if not fstypes:<br> > - bb.fatal('Unsupported image type built. Add a comptible image to '<br> > - 'IMAGE_FSTYPES. Supported types: %s' %<br> > - ', '.join(supported_fstypes))<br> > + fstypes = d.getVar('IMAGE_FSTYPES')<br> > + if d.getVar("TEST_TARGET") == "qemu":<br> > + fstypes = [fs for fs in fstypes if fs in supported_fstypes]<br> > + if not fstypes:<br> > + bb.fatal('Unsupported image type built. Add a comptible image to '<br> > + 'IMAGE_FSTYPES. Supported types: %s' %<br> > + ', '.join(supported_fstypes))<br> > rootfs = '%s.%s' % (image_name, fstypes[0])<br> > <br> > # Get tmpdir (not really used, just for compatibility)<br> <br> This causes the autobuilder to break and there is a bug in the logic<br> above:<br> <br> <a href="https://autobuilder.yoctoproject.org/typhoon/#/builders/32/builds/128/steps/7/logs/step1c" rel="noreferrer" target="_blank">https://autobuilder.yoctoproject.org/typhoon/#/builders/32/builds/128/steps/7/logs/step1c</a></blockquote><div><br></div><div>I'm not seeing this error, I executed testimage in qemuarm and qemux86, </div><div>I'm looking at the configuration but should not fail because I added only a conditional to filter only<br></div><div>when the target is qemu.</div><div><br></div><div>Regards,</div><div>Anibal </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br> <br> (one of many failures as everything broke)<br> <br> Cheers,<br> <br> Richard<br> <br> <br> </blockquote></div></div> -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
On Tue, 23 Oct 2018 at 01:38, Anibal Limon <anibal.limon@linaro.org> wrote: >> > - fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ') >> > + fstypes = d.getVar('IMAGE_FSTYPES') >> > + fstypes = [fs for fs in fstypes if fs in supported_fstypes] That's the problem, the old code takes IMAGE_FSTYPES and splits it on whitespace, the new code iterates over each *character* Ross -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
On Thu, 15 Nov 2018 at 07:08, Burton, Ross <ross.burton@intel.com> wrote: > On Tue, 23 Oct 2018 at 01:38, Anibal Limon <anibal.limon@linaro.org> > wrote: > >> > - fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ') > > >> > + fstypes = d.getVar('IMAGE_FSTYPES') > >> > + fstypes = [fs for fs in fstypes if fs in supported_fstypes] > > That's the problem, the old code takes IMAGE_FSTYPES and splits it on > whitespace, the new code iterates over each *character* > I sent an old version, sorry for that, sending v3... Anibal > > Ross > <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 15 Nov 2018 at 07:08, Burton, Ross <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 23 Oct 2018 at 01:38, Anibal Limon <<a href="mailto:anibal.limon@linaro.org" target="_blank">anibal.limon@linaro.org</a>> wrote:<br> >> > - fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ')<br> <br> >> > + fstypes = d.getVar('IMAGE_FSTYPES')<br> >> > + fstypes = [fs for fs in fstypes if fs in supported_fstypes]<br> <br> That's the problem, the old code takes IMAGE_FSTYPES and splits it on<br> whitespace, the new code iterates over each *character*<br></blockquote><div><br></div><div>I sent an old version, sorry for that, sending v3...</div><div><br></div><div>Anibal</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br> Ross<br> </blockquote></div></div> -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 2642a722e7..734cb7caae 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -194,12 +194,13 @@ def testimage_main(d): machine = d.getVar("MACHINE") # Get rootfs - fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ') - if fs in supported_fstypes] - if not fstypes: - bb.fatal('Unsupported image type built. Add a comptible image to ' - 'IMAGE_FSTYPES. Supported types: %s' % - ', '.join(supported_fstypes)) + fstypes = d.getVar('IMAGE_FSTYPES') + if d.getVar("TEST_TARGET") == "qemu": + fstypes = [fs for fs in fstypes if fs in supported_fstypes] + if not fstypes: + bb.fatal('Unsupported image type built. Add a comptible image to ' + 'IMAGE_FSTYPES. Supported types: %s' % + ', '.join(supported_fstypes)) rootfs = '%s.%s' % (image_name, fstypes[0]) # Get tmpdir (not really used, just for compatibility)
When use simpleremote target the flash/boot process is executed manually, the IMAGE_FSTYPES validation is only needed when execute testimage against qemu. The supported_fstypes comes from oeqa.core.target.qemu module. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> --- meta/classes/testimage.bbclass | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)