summaryrefslogtreecommitdiffstats
path: root/scripts/lib/compatlayer/__init__.py
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-04-12 17:44:26 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-13 10:54:10 +0100
commit68079d0f873b1aaf747828a6d464157384dd00b9 (patch)
tree128c69b02f2cf339cc185754ab8dbb1f2bb41a88 /scripts/lib/compatlayer/__init__.py
parentde76d1cc94c5a59000fbca9d5e53a5917f4e3041 (diff)
downloadpoky-68079d0f873b1aaf747828a6d464157384dd00b9.tar.gz
yocto-compat-layer: better handling of per-machine world build breakage
It is fairly common that BSP layers enable recipes when choosing machines from that layer without checking whether the recipe actually builds in the current distro. That breaks "bitbake world", retrieving signatures and thus the test_machine_signatures test. It's better to let that test continue with the signatures that can be retrieved and report the broken world build separately. Right now, the new test_machine_world iterates over all machines. More elegant and useful in combination with a (currently missing) selection of which tests to run would be to generate one test instance per machine. But that is not straightforward and has to wait. The "-k" argument alone was not enough to proceed despite failures, because bitbake then still returns a non-zero exit code. The existance of the output file is taken as sign that the bitbake execution managed was not fatally broken. (From OE-Core rev: 02f5d7836b726e40fef82b50b8145acc839b360b) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/compatlayer/__init__.py')
-rw-r--r--scripts/lib/compatlayer/__init__.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/lib/compatlayer/__init__.py b/scripts/lib/compatlayer/__init__.py
index 0d6f4e9c3b..e35f8c0d32 100644
--- a/scripts/lib/compatlayer/__init__.py
+++ b/scripts/lib/compatlayer/__init__.py
@@ -233,9 +233,21 @@ def get_signatures(builddir, failsafe=False, machine=None):
233 if failsafe: 233 if failsafe:
234 cmd += '-k ' 234 cmd += '-k '
235 cmd += '-S none world' 235 cmd += '-S none world'
236 check_command('Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities.',
237 cmd)
238 sigs_file = os.path.join(builddir, 'locked-sigs.inc') 236 sigs_file = os.path.join(builddir, 'locked-sigs.inc')
237 if os.path.exists(sigs_file):
238 os.unlink(sigs_file)
239 try:
240 check_command('Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities.',
241 cmd)
242 except RuntimeError as ex:
243 if failsafe and os.path.exists(sigs_file):
244 # Ignore the error here. Most likely some recipes active
245 # in a world build lack some dependencies. There is a
246 # separate test_machine_world_build which exposes the
247 # failure.
248 pass
249 else:
250 raise
239 251
240 sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$") 252 sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$")
241 tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*") 253 tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*")