diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-26 15:07:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-27 09:42:08 +0000 |
commit | 8c1e43ca58fe6616fa4b98bf1076f31d4bfd095d (patch) | |
tree | 47c16b575dfdf6109ca56d9691aef468c68e738d /bitbake/lib/bb/cooker.py | |
parent | 172095e09f3b0fc0e287aebcf922872475a9991d (diff) | |
download | poky-8c1e43ca58fe6616fa4b98bf1076f31d4bfd095d.tar.gz |
bitbake: cooker/event: Overhaul sanity test mechanism
Sanity tests are currently a pain as its hard to control when they run. This results
in issues where for example the bitbake -e output is not useful as the sanity tests
prevent it from executing. The sanity tests should run later than the base configuration.
This patch changes the sanity tests to always be event triggered with the option of
returning either events on the status, or raising errors. A new cooker feature is used
to change the behaviour depending on the controlling UI.
This does need a change to sanity.bbclass in the OE metadata but its worth the pain
for the increased flexibility and control this offers UIs and the improvement to the
user experience.
(Bitbake rev: 32e171bcc92c6e27fefee971e8714ddf8e1a8ac1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index e4cff3a23e..e81d887268 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -82,7 +82,7 @@ class SkippedPackage: | |||
82 | 82 | ||
83 | 83 | ||
84 | class CookerFeatures(object): | 84 | class CookerFeatures(object): |
85 | _feature_list = [HOB_EXTRA_CACHES, SEND_DEPENDS_TREE, BASEDATASTORE_TRACKING] = range(3) | 85 | _feature_list = [HOB_EXTRA_CACHES, SEND_DEPENDS_TREE, BASEDATASTORE_TRACKING, SEND_SANITYEVENTS] = range(4) |
86 | 86 | ||
87 | def __init__(self): | 87 | def __init__(self): |
88 | self._features=set() | 88 | self._features=set() |
@@ -1268,6 +1268,8 @@ class BBCooker: | |||
1268 | 1268 | ||
1269 | if self.state != state.parsing: | 1269 | if self.state != state.parsing: |
1270 | self.parseConfiguration () | 1270 | self.parseConfiguration () |
1271 | if CookerFeatures.SEND_SANITYEVENTS in self.featureset: | ||
1272 | bb.event.fire(bb.event.SanityCheck(False), self.data) | ||
1271 | 1273 | ||
1272 | ignore = self.data.getVar("ASSUME_PROVIDED", True) or "" | 1274 | ignore = self.data.getVar("ASSUME_PROVIDED", True) or "" |
1273 | self.recipecache.ignored_dependencies = set(ignore.split()) | 1275 | self.recipecache.ignored_dependencies = set(ignore.split()) |