[oe-commits] [openembedded-core] 01/04: yocto-check-layer: add a test for correct setting of LAYERSERIES_COMPAT_collection

git at git.openembedded.org git at git.openembedded.org
Mon Apr 9 11:12:48 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo-next
in repository openembedded-core.

commit 13a80b22f28b81a0082d181674295a0f96111f6b
Author: Alexander Kanavin <alexander.kanavin at linux.intel.com>
AuthorDate: Fri Apr 6 17:07:22 2018 +0300

    yocto-check-layer: add a test for correct setting of LAYERSERIES_COMPAT_collection
    
    [YOCTO #12661]
    
    Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/checklayer/__init__.py     | 2 ++
 scripts/lib/checklayer/cases/common.py | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py
index 288c457..2618416 100644
--- a/scripts/lib/checklayer/__init__.py
+++ b/scripts/lib/checklayer/__init__.py
@@ -56,9 +56,11 @@ def _get_layer_collections(layer_path, lconf=None, data=None):
         priority = ldata.getVar('BBFILE_PRIORITY_%s' % name)
         pattern = ldata.getVar('BBFILE_PATTERN_%s' % name)
         depends = ldata.getVar('LAYERDEPENDS_%s' % name)
+        compat = ldata.getVar('LAYERSERIES_COMPAT_%s' % name)
         collections[name]['priority'] = priority
         collections[name]['pattern'] = pattern
         collections[name]['depends'] = depends
+        collections[name]['compat'] = compat
 
     return collections
 
diff --git a/scripts/lib/checklayer/cases/common.py b/scripts/lib/checklayer/cases/common.py
index a13c108..1bef61b 100644
--- a/scripts/lib/checklayer/cases/common.py
+++ b/scripts/lib/checklayer/cases/common.py
@@ -51,3 +51,8 @@ class CommonCheckLayer(OECheckLayerTestCase):
         msg = compare_signatures(self.td['sigs'], curr_sigs)
         if msg is not None:
             self.fail('Adding layer %s changed signatures.\n%s' % (self.tc.layer['name'], msg))
+
+    def test_layerseries_compat(self):
+        for collection_name, collection_data in self.tc.layer['collections'].items():
+            self.assertTrue(collection_data['compat'], "Collection %s from layer %s does not set compatible oe-core versions via LAYERSERIES_COMPAT_collection." \
+                 % (collection_name, self.tc.layer['name']))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list