From 7458ad340f6bc05a2e12e85f3a09feef4d1bf4d2 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 8 Dec 2022 11:54:32 +0000 Subject: yocto-check-layer: Allow OE-Core to be tested For unknown reasons we've never seemingly run the check layer script against OE-Core itself. This isn't entirely straightforward as the core layer is a bit of a special case, we can't for example compare signatures against ourselve and we can't remove core from bblayers.conf. Core does have distro, machine and software components too, in the case of distro, our fallback default settings. Whilst the qemu machines could be split into a seperate layer directory, core wouldn't then parse at all standalone due to the lack of any machine so it seems a bit pointless to do that. These changes tweak the script to handle core's special cases, specifically to allow distro and machine directories and to account for the README placed a directory level higher than other layers. (From OE-Core rev: ba312ed228507d05f280aeb96819d671b01400b8) Signed-off-by: Richard Purdie Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- scripts/yocto-check-layer | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/yocto-check-layer') diff --git a/scripts/yocto-check-layer b/scripts/yocto-check-layer index 0e5b75b1f7..67cc71950f 100755 --- a/scripts/yocto-check-layer +++ b/scripts/yocto-check-layer @@ -168,14 +168,13 @@ def main(): layers_tested = 0 for layer in layers: - if layer['type'] == LayerType.ERROR_NO_LAYER_CONF or \ - layer['type'] == LayerType.ERROR_BSP_DISTRO: + if layer['type'] in (LayerType.ERROR_NO_LAYER_CONF, LayerType.ERROR_BSP_DISTRO): continue # Reset to a clean backup copy for each run shutil.copyfile(bblayersconf + '.backup', bblayersconf) - if check_bblayers(bblayersconf, layer['path'], logger): + if layer['type'] not in (LayerType.CORE, ) and check_bblayers(bblayersconf, layer['path'], logger): logger.info("%s already in %s. To capture initial signatures, layer under test should not present " "in BBLAYERS. Please remove %s from BBLAYERS." % (layer['name'], bblayersconf, layer['name'])) results[layer['name']] = None -- cgit v1.2.3-54-g00ecf