All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU
@ 2018-10-16 23:21 Aníbal Limón
  2018-10-20  7:11 ` richard.purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Aníbal Limón @ 2018-10-16 23:21 UTC (permalink / raw)
  To: openembedded-core

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)
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU
  2018-10-16 23:21 [PATCH] meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU Aníbal Limón
@ 2018-10-20  7:11 ` richard.purdie
  2018-10-23  0:38   ` Anibal Limon
  0 siblings, 1 reply; 5+ messages in thread
From: richard.purdie @ 2018-10-20  7:11 UTC (permalink / raw)
  To: Aníbal Limón, openembedded-core

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU
  2018-10-20  7:11 ` richard.purdie
@ 2018-10-23  0:38   ` Anibal Limon
  2018-11-15 13:07     ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Anibal Limon @ 2018-10-23  0:38 UTC (permalink / raw)
  To: Richard Purdie; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2282 bytes --]

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
>
>
>

[-- Attachment #2: Type: text/html, Size: 3343 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU
  2018-10-23  0:38   ` Anibal Limon
@ 2018-11-15 13:07     ` Burton, Ross
  2019-01-02 16:07       ` Anibal Limon
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2018-11-15 13:07 UTC (permalink / raw)
  To: Aníbal Limón; +Cc: OE-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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU
  2018-11-15 13:07     ` Burton, Ross
@ 2019-01-02 16:07       ` Anibal Limon
  0 siblings, 0 replies; 5+ messages in thread
From: Anibal Limon @ 2019-01-02 16:07 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

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
>

[-- Attachment #2: Type: text/html, Size: 1202 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-02 16:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 23:21 [PATCH] meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU Aníbal Limón
2018-10-20  7:11 ` richard.purdie
2018-10-23  0:38   ` Anibal Limon
2018-11-15 13:07     ` Burton, Ross
2019-01-02 16:07       ` Anibal Limon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.