]> code.ossystems Code Review - openembedded-core.git/commitdiff
yocto-check-layer: add a test for correct setting of LAYERSERIES_COMPAT_collection
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Fri, 6 Apr 2018 14:07:22 +0000 (17:07 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Apr 2018 11:10:47 +0000 (12:10 +0100)
[YOCTO #12661]

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/checklayer/__init__.py
scripts/lib/checklayer/cases/common.py

index 288c457822dbf9e0ab83267582606ee958e33f73..2618416fab27f616cb1de03d1df8db95571630cb 100644 (file)
@@ -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
 
index a13c1088f07da69683b9f3a3efc1aac7cfe0d276..1bef61b0487e5f8f61ad9bdf631db1757dea70bd 100644 (file)
@@ -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']))