summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-26 15:09:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-27 09:40:02 +0000
commit97108a5647f9278280c923ef69d2b0b945a26eef (patch)
treef46f1972ed7db11623e1a6726be6f17b65ec37d7 /meta/classes
parentfe2692c1ad1fcdbcdbc0ba419db8ff9ddb390fa7 (diff)
downloadopenembedded-core-97108a5647f9278280c923ef69d2b0b945a26eef.tar.gz
openembedded-core-97108a5647f9278280c923ef69d2b0b945a26eef.tar.bz2
openembedded-core-97108a5647f9278280c923ef69d2b0b945a26eef.zip
sanity.bbclass: Update against bitbake sanity event changes
Bitbake will now trigger sanity events when it needs the checks to run in all cases so we can drop the ConfigParsed hook. We now control whether events are generated or errors are raised from the event itself. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sanity.bbclass13
1 files changed, 6 insertions, 7 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index d79db8f800..cf514d0c23 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -779,20 +779,19 @@ def copy_data(e):
return sanity_data
addhandler check_sanity_eventhandler
-check_sanity_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.SanityCheck bb.event.NetworkTest"
+check_sanity_eventhandler[eventmask] = "bb.event.SanityCheck bb.event.NetworkTest"
python check_sanity_eventhandler() {
- if bb.event.getName(e) == "ConfigParsed" and e.data.getVar("BB_WORKERCONTEXT", True) != "1" and e.data.getVar("DISABLE_SANITY_CHECKS", True) != "1":
+ if bb.event.getName(e) == "SanityCheck":
sanity_data = copy_data(e)
- reparse = check_sanity(sanity_data)
- e.data.setVar("BB_INVALIDCONF", reparse)
- elif bb.event.getName(e) == "SanityCheck":
- sanity_data = copy_data(e)
- sanity_data.setVar("SANITY_USE_EVENTS", "1")
+ if e.generateevents:
+ sanity_data.setVar("SANITY_USE_EVENTS", "1")
reparse = check_sanity(sanity_data)
e.data.setVar("BB_INVALIDCONF", reparse)
bb.event.fire(bb.event.SanityCheckPassed(), e.data)
elif bb.event.getName(e) == "NetworkTest":
sanity_data = copy_data(e)
+ if e.generateevents:
+ sanity_data.setVar("SANITY_USE_EVENTS", "1")
bb.event.fire(bb.event.NetworkTestFailed() if check_connectivity(sanity_data) else bb.event.NetworkTestPassed(), e.data)
return