diff options
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index 30540483c3..9c59fd07c6 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py @@ -43,7 +43,7 @@ import xmlrpclib featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING, bb.cooker.CookerFeatures.SEND_SANITYEVENTS] -logger = logging.getLogger("BitBake") +logger = logging.getLogger("ToasterLogger") interactive = sys.stdout.isatty() @@ -66,7 +66,6 @@ def _log_settings_from_server(server): def main(server, eventHandler, params ): - helper = uihelper.BBUIHelper() console = logging.StreamHandler(sys.stdout) @@ -235,12 +234,18 @@ def main(server, eventHandler, params ): if isinstance(event, (bb.event.TreeDataPreparationStarted, bb.event.TreeDataPreparationCompleted)): continue - if isinstance(event, (bb.event.BuildCompleted)): + if isinstance(event, (bb.event.BuildCompleted, bb.command.CommandFailed)): + + if (isinstance(event, bb.command.CommandFailed)): + errors += 1 + errorcode = 1 + logger.error("Command execution failed: %s", event.error) + # update the build info helper on BuildCompleted, not on CommandXXX buildinfohelper.update_build_information(event, errors, warnings, taskfailures) buildinfohelper.close(errorcode) # mark the log output; controllers may kill the toasterUI after seeing this log - logger.info("ToasterUI build done") + logger.info("ToasterUI build done 1, brbe: %s" % buildinfohelper.brbe ) # we start a new build info if buildinfohelper.brbe is not None: @@ -254,22 +259,13 @@ def main(server, eventHandler, params ): taskfailures = [] buildinfohelper = BuildInfoHelper(server, build_history_enabled) + logger.info("ToasterUI build done 2") continue if isinstance(event, (bb.command.CommandCompleted, bb.command.CommandFailed, bb.command.CommandExit)): errorcode = 0 - if (isinstance(event, bb.command.CommandFailed)): - event.levelno = format.ERROR - event.msg = "Command Failed " + event.error - event.pathname = "" - event.lineno = 0 - buildinfohelper.store_log_event(event) - errors += 1 - errorcode = 1 - logger.error("Command execution failed: %s", event.error) - continue |