@@ -287,9 +287,18 @@ def check_command(error_msg, cmd, cwd=None):
raise RuntimeError(msg)
return output
+# The world signatures of each dump that succeeded: the tests ask for the
+# same dump with and without -k, which only differ when it fails
+signatures_cache = {}
+
def get_signatures(builddir, failsafe=False, machine=None, extravars=None):
import re
+ with open(os.path.join(builddir, 'conf', 'bblayers.conf')) as f:
+ key = (f.read(), machine, extravars)
+ if key in signatures_cache:
+ return signatures_cache[key]
+
# some recipes needs to be excluded like meta-world-pkgdata
# because a layer can add recipes to a world build so signature
# will be change
@@ -320,7 +329,7 @@ def get_signatures(builddir, failsafe=False, machine=None, extravars=None):
# in a world build lack some dependencies. There is a
# separate test_machine_world_build which exposes the
# failure.
- pass
+ key = None
else:
raise
@@ -362,6 +371,8 @@ def get_signatures(builddir, failsafe=False, machine=None, extravars=None):
if not sigs:
raise RuntimeError('Can\'t load signatures from %s' % sigs_file)
+ if key:
+ signatures_cache[key] = (sigs, tune2tasks)
return (sigs, tune2tasks)
def get_depgraph(targets=['world'], failsafe=False):
test_signatures and test_world dump the same world signatures, with and without -k, and so do test_machine_signatures and test_machine_world for each machine; when the dump succeeds, the second only repeats a world parse. Keep the signatures of each successful dump, keyed by the layers in bblayers.conf, MACHINE and extra variables, and return them when the same dump is asked for again. A failed dump is not kept, so the world tests still run it and report the failure. Tested on meta-freescale with two machines: 5 world dumps instead of 8, same results; a recipe breaking world on one machine still fails test_machine_world for that machine only. Suggested-by: Luciano Dittgen <luciano.dittgen@ossystems.com.br> AI-Generated: Uses Claude Code (Claude Opus 5.5) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> --- scripts/lib/checklayer/__init__.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)