]> code.ossystems Code Review - openembedded-core.git/commitdiff
yocto-compat-layer.py: tolerate broken world builds during signature diff
authorPatrick Ohly <patrick.ohly@intel.com>
Tue, 27 Jun 2017 15:33:39 +0000 (17:33 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Jul 2017 13:38:06 +0000 (14:38 +0100)
The "test_signatures" test ignored a broken world build when getting
signatures, but the code which then tried to analyze a difference
found by the test didn't, which prevented printing the difference.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/compatlayer/__init__.py
scripts/lib/compatlayer/cases/common.py

index eaae4e534f3c47c282dc7d78b2e9b1d1eed4ca57..451e1de950ffc66b8b9b077db5d336c67c74668d 100644 (file)
@@ -290,7 +290,7 @@ def get_signatures(builddir, failsafe=False, machine=None):
 
     return (sigs, tune2tasks)
 
-def get_depgraph(targets=['world']):
+def get_depgraph(targets=['world'], failsafe=False):
     '''
     Returns the dependency graph for the given target(s).
     The dependency graph is taken directly from DepTreeEvent.
@@ -309,6 +309,11 @@ def get_depgraph(targets=['world']):
                 elif isinstance(event, bb.command.CommandCompleted):
                     break
                 elif isinstance(event, bb.event.NoProvider):
+                    if failsafe:
+                        # The event is informational, we will get information about the
+                        # remaining dependencies eventually and thus can ignore this
+                        # here like we do in get_signatures(), if desired.
+                        continue
                     if event._reasons:
                         raise RuntimeError('Nothing provides %s: %s' % (event._item, event._reasons))
                     else:
index 8eeada9b1e14caeadfbc874e374f24783e0c3243..2dfcbb1c324cafd945525c43580797232b617d35 100644 (file)
@@ -50,7 +50,7 @@ class CommonCompatLayer(OECompatLayerTestCase):
             def graph2sig(task):
                 pn, taskname = task.rsplit('.', 1)
                 return pn + ':' + taskname
-            depgraph = get_depgraph()
+            depgraph = get_depgraph(failsafe=True)
             depends = depgraph['tdepends']
 
             # If a task A has a changed signature, but none of its