Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 0cc5141

Browse files
committed
refkit_poky.py: add test_compat_meta_refkit_extra
Only active layers were tested so far. We explicitly have look for inactive ones (like meta-refkit-extra) and also add a compat test for them. This currently fails, because meta-refkit-extra unconditionally changes glog: meta-refkit-extra/recipes-convnet/glog/glog_%.bbappend:DEPENDS += "gflags" TODO: do we want the layer to be Yocto Compatible 2.0? Signed-off-by: Patrick Ohly <[email protected]>
1 parent e77f1f1 commit 0cc5141

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

meta-refkit/lib/oeqa/selftest/cases/refkit_poky.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class RefkitPokyMeta(type):
5454
Generates different instances of test_compat_meta_<layer> for each refkit layer.
5555
"""
5656
def __new__(mcs, name, bases, dict):
57-
def gen_test(refkit_layer):
57+
def add_test(dict, refkit_layer, path):
5858
def test(self):
5959
"""
6060
Test Yocto Compatible 2.0 status of each refkit layer.
@@ -66,7 +66,7 @@ def test(self):
6666
cmd = "%s/scripts/yocto-compat-layer.py --dependency %s -- %s" % (
6767
self.layers['meta-refkit'],
6868
' '.join(self.layers.values()),
69-
self.layers[refkit_layer])
69+
path)
7070
# "world" does not include images. We need to enable them explicitly, otherwise
7171
# their dependencies won't be checked. Only "development" mode is guaranteed to
7272
# work out-of-the-box. However, images change their signatures when adding
@@ -93,11 +93,20 @@ def test(self):
9393
if 'INFO: FAILED' in result.output:
9494
self.fail(result.output)
9595
self.logger.info('%s:\n%s' % (cmd, result.output))
96-
return test
9796

98-
for refkit_layer in [x for x in RefkitLayers.layers.keys() if x.startswith('meta-refkit')]:
9997
test_name = 'test_compat_%s' % refkit_layer.replace('-', '_')
100-
dict[test_name] = gen_test(refkit_layer)
98+
dict[test_name] = test
99+
100+
# Test all active refkit layers.
101+
for refkit_layer in [x for x in RefkitLayers.layers.keys() if x.startswith('meta-refkit')]:
102+
add_test(dict, refkit_layer, RefkitLayers.layers[refkit_layer])
103+
104+
# And also all inactive ones that we find next to meta-refkit.
105+
root_dir = os.path.dirname(RefkitLayers.layers['meta-refkit'])
106+
for entry in os.listdir(root_dir):
107+
if entry.startswith('meta-refkit') and entry not in RefkitLayers.layers:
108+
add_test(dict, entry, os.path.join(root_dir, entry))
109+
101110
return type.__new__(mcs, name, bases, dict)
102111

103112
class TestRefkitPokyBase(OESelftestTestCase, RefkitLayers):

0 commit comments

Comments
 (0)