summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/event.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-26 15:07:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-27 09:42:08 +0000
commit8c1e43ca58fe6616fa4b98bf1076f31d4bfd095d (patch)
tree47c16b575dfdf6109ca56d9691aef468c68e738d /bitbake/lib/bb/event.py
parent172095e09f3b0fc0e287aebcf922872475a9991d (diff)
downloadpoky-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/event.py')
-rw-r--r--bitbake/lib/bb/event.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 10eae5fde8..e2050431ec 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -601,8 +601,11 @@ class MetadataEvent(Event):
601 601
602class SanityCheck(Event): 602class SanityCheck(Event):
603 """ 603 """
604 Event to issue sanity check 604 Event to runs sanity checks, either raise errors or generate events as return status.
605 """ 605 """
606 def __init__(self, generateevents = True):
607 Event.__init__(self)
608 self.generateevents = generateevents
606 609
607class SanityCheckPassed(Event): 610class SanityCheckPassed(Event):
608 """ 611 """
@@ -620,8 +623,11 @@ class SanityCheckFailed(Event):
620 623
621class NetworkTest(Event): 624class NetworkTest(Event):
622 """ 625 """
623 Event to start network test 626 Event to run network connectivity tests, either raise errors or generate events as return status.
624 """ 627 """
628 def __init__(self, generateevents = True):
629 Event.__init__(self)
630 self.generateevents = generateevents
625 631
626class NetworkTestPassed(Event): 632class NetworkTestPassed(Event):
627 """ 633 """