[OE-core] [PATCH v2 07/13] selftest: imagefeatures: skip tests in case distro feature is missing

Burton, Ross ross.burton at intel.com
Tue Dec 13 15:05:29 UTC 2016


On 24 November 2016 at 20:58, <leonardo.sandoval.gonzalez at linux.intel.com>
wrote:

> From: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
>
> core-image-clutter and core-image-weston, both required opengl in distro
> features, skip relevant tests if this is not the case.
>
> Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@
> linux.intel.com>
> ---
>  meta/lib/oeqa/selftest/imagefeatures.py | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/lib/oeqa/selftest/imagefeatures.py
> b/meta/lib/oeqa/selftest/imagefeatures.py
> index d015c49..a61510b 100644
> --- a/meta/lib/oeqa/selftest/imagefeatures.py
> +++ b/meta/lib/oeqa/selftest/imagefeatures.py
> @@ -78,6 +78,8 @@ class ImageFeatures(oeSelfTest):
>          """
>
>          # Build a core-image-clutter
> +        if 'opengl' not in get_bb_var('DISTRO_FEATURES'):
> +            self.skipTest('opengl not present on DISTRO_FEATURES so
> core-image-clutter cannot be built')
>          bitbake('core-image-clutter')
>

I don't see the point of this test.  Lets save five minutes by just
deleting it.


>      @testcase(1117)
> @@ -96,6 +98,8 @@ class ImageFeatures(oeSelfTest):
>          self.write_config(features)
>
>          # Build a core-image-weston
> +        if 'opengl' not in get_bb_var('DISTRO_FEATURES'):
> +            self.skipTest('opengl not present on DISTRO_FEATURES so
> core-image-weston cannot be built')
>          bitbake('core-image-weston')


The full test is:

        features = 'DISTRO_FEATURES_append = " wayland"\n'
        features += 'CORE_IMAGE_EXTRA_INSTALL += "wayland weston"'
        self.write_config(features)

        # Build a core-image-weston
        bitbake('core-image-weston')

Adding wayland and weston to IMAGE_INSTALL is pointless as thats what the
image does.  Adding wayland is madness if the distro doesn't support it.

Can you rewrite this test so it's basically just "if DISTRO_FEATURES
contains opengl and wayland, build core-image-weston".

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20161213/28224407/attachment-0002.html>


More information about the Openembedded-core mailing list