[OE-core] [PATCH V3 2/4] selftest: imagefeatures: skip tests based on distro features and supported fstypes

leonardo.sandoval.gonzalez at linux.intel.com leonardo.sandoval.gonzalez at linux.intel.com
Mon Jan 9 17:45:52 UTC 2017


From: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>

Some images (clutter and weston) requires certain distros features to be present,
so check presence before proceeding. Some distros does not support the ext4* fstypes
(poky-tiny only supports cpio.gz) so skip the test if this is the case.

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
---
 meta/lib/oeqa/selftest/imagefeatures.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meta/lib/oeqa/selftest/imagefeatures.py b/meta/lib/oeqa/selftest/imagefeatures.py
index d015c49..5d50c69 100644
--- a/meta/lib/oeqa/selftest/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/imagefeatures.py
@@ -77,6 +77,9 @@ class ImageFeatures(oeSelfTest):
         AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate at intel.com>
         """
 
+        if 'opengl' not in get_bb_var('DISTRO_FEATURES'):
+            self.skipTest('opengl not present on DISTRO_FEATURES so core-image-clutter cannot be built')
+
         # Build a core-image-clutter
         bitbake('core-image-clutter')
 
@@ -91,6 +94,10 @@ class ImageFeatures(oeSelfTest):
         AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate at intel.com>
         """
 
+        distro_features = get_bb_var('DISTRO_FEATURES')
+        if not ('opengl' in distro_features and 'wayland' in distro_features):
+            self.skipTest('neither opengl nor wayland present on DISTRO_FEATURES so core-image-weston cannot be built')
+
         features = 'DISTRO_FEATURES_append = " wayland"\n'
         features += 'CORE_IMAGE_EXTRA_INSTALL += "wayland weston"'
         self.write_config(features)
@@ -110,6 +117,10 @@ class ImageFeatures(oeSelfTest):
         features = 'IMAGE_FSTYPES += " ext4 ext4.bmap"'
         self.write_config(features)
 
+        image_fstypes = get_bb_var('IMAGE_FSTYPES')
+        if 'ext4 ext4.bmap' not in image_fstypes:
+            self.skipTest('Current distro does not allow "ext4 ext4.bmap" filesystem type. Supported: %s' % image_fstypes)
+
         image_name = 'core-image-minimal'
         bitbake(image_name)
 
-- 
2.1.4




More information about the Openembedded-core mailing list