diff options
Diffstat (limited to 'bitbake/lib/bb')
-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 | |||
43 | 43 | ||
44 | featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING, bb.cooker.CookerFeatures.SEND_SANITYEVENTS] | 44 | featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING, bb.cooker.CookerFeatures.SEND_SANITYEVENTS] |
45 | 45 | ||
46 | logger = logging.getLogger("BitBake") | 46 | logger = logging.getLogger("ToasterLogger") |
47 | interactive = sys.stdout.isatty() | 47 | interactive = sys.stdout.isatty() |
48 | 48 | ||
49 | 49 | ||
@@ -66,7 +66,6 @@ def _log_settings_from_server(server): | |||
66 | 66 | ||
67 | 67 | ||
68 | def main(server, eventHandler, params ): | 68 | def main(server, eventHandler, params ): |
69 | |||
70 | helper = uihelper.BBUIHelper() | 69 | helper = uihelper.BBUIHelper() |
71 | 70 | ||
72 | console = logging.StreamHandler(sys.stdout) | 71 | console = logging.StreamHandler(sys.stdout) |
@@ -235,12 +234,18 @@ def main(server, eventHandler, params ): | |||
235 | if isinstance(event, (bb.event.TreeDataPreparationStarted, bb.event.TreeDataPreparationCompleted)): | 234 | if isinstance(event, (bb.event.TreeDataPreparationStarted, bb.event.TreeDataPreparationCompleted)): |
236 | continue | 235 | continue |
237 | 236 | ||
238 | if isinstance(event, (bb.event.BuildCompleted)): | 237 | if isinstance(event, (bb.event.BuildCompleted, bb.command.CommandFailed)): |
238 | |||
239 | if (isinstance(event, bb.command.CommandFailed)): | ||
240 | errors += 1 | ||
241 | errorcode = 1 | ||
242 | logger.error("Command execution failed: %s", event.error) | ||
243 | |||
239 | # update the build info helper on BuildCompleted, not on CommandXXX | 244 | # update the build info helper on BuildCompleted, not on CommandXXX |
240 | buildinfohelper.update_build_information(event, errors, warnings, taskfailures) | 245 | buildinfohelper.update_build_information(event, errors, warnings, taskfailures) |
241 | buildinfohelper.close(errorcode) | 246 | buildinfohelper.close(errorcode) |
242 | # mark the log output; controllers may kill the toasterUI after seeing this log | 247 | # mark the log output; controllers may kill the toasterUI after seeing this log |
243 | logger.info("ToasterUI build done") | 248 | logger.info("ToasterUI build done 1, brbe: %s" % buildinfohelper.brbe ) |
244 | 249 | ||
245 | # we start a new build info | 250 | # we start a new build info |
246 | if buildinfohelper.brbe is not None: | 251 | if buildinfohelper.brbe is not None: |
@@ -254,22 +259,13 @@ def main(server, eventHandler, params ): | |||
254 | taskfailures = [] | 259 | taskfailures = [] |
255 | buildinfohelper = BuildInfoHelper(server, build_history_enabled) | 260 | buildinfohelper = BuildInfoHelper(server, build_history_enabled) |
256 | 261 | ||
262 | logger.info("ToasterUI build done 2") | ||
257 | continue | 263 | continue |
258 | 264 | ||
259 | if isinstance(event, (bb.command.CommandCompleted, | 265 | if isinstance(event, (bb.command.CommandCompleted, |
260 | bb.command.CommandFailed, | 266 | bb.command.CommandFailed, |
261 | bb.command.CommandExit)): | 267 | bb.command.CommandExit)): |
262 | errorcode = 0 | 268 | errorcode = 0 |
263 | if (isinstance(event, bb.command.CommandFailed)): | ||
264 | event.levelno = format.ERROR | ||
265 | event.msg = "Command Failed " + event.error | ||
266 | event.pathname = "" | ||
267 | event.lineno = 0 | ||
268 | buildinfohelper.store_log_event(event) | ||
269 | errors += 1 | ||
270 | errorcode = 1 | ||
271 | logger.error("Command execution failed: %s", event.error) | ||
272 | |||
273 | 269 | ||
274 | continue | 270 | continue |
275 | 271 | ||