[Toaster] [PATCH 30/30] toasterui: process CommandStarted event

Ed Bartosh ed.bartosh at linux.intel.com
Thu Nov 26 03:27:52 PST 2015


Currently BRBE is known to toasterui only when build is
started. It't passed to it with BuildStarted event. This is
too late as if build fails earilier than build starts toasterui
can not inform Toaster about the failure.

Set BRBE as soon as it's provided by Toaster.
This should make toasterui to be able to inform Toaster
about early build failures, i.e. failures during parsing.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 bitbake/lib/bb/ui/toasterui.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 435cc2b..1fc5f1f 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -185,6 +185,13 @@ def main(server, eventHandler, params):
             # pylint: disable=protected-access
             # the code will look into the protected variables of the event; no easy way around this
 
+            # Set brbe as soon as it's provided by toaster
+            if isinstance(event, bb.command.CommandStarted):
+                if event.commandline[0] == 'setVariable' and \
+                   event.commandline[1] == 'TOASTER_BRBE':
+                    buildinfohelper.brbe = event.commandline[2]
+                continue
+
             # we treat ParseStarted as the first event of toaster-triggered
             # builds; that way we get the Build Configuration included in the log
             # and any errors that occur before BuildStarted is fired
-- 
2.1.4



More information about the toaster mailing list