summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r--bitbake/lib/bb/ui/toasterui.py31
1 files changed, 20 insertions, 11 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index f399a7d316..7d670bef6f 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -102,6 +102,7 @@ _evt_list = [
102 "bb.command.CommandExit", 102 "bb.command.CommandExit",
103 "bb.command.CommandFailed", 103 "bb.command.CommandFailed",
104 "bb.cooker.CookerExit", 104 "bb.cooker.CookerExit",
105 "bb.event.BuildInit",
105 "bb.event.BuildCompleted", 106 "bb.event.BuildCompleted",
106 "bb.event.BuildStarted", 107 "bb.event.BuildStarted",
107 "bb.event.CacheLoadCompleted", 108 "bb.event.CacheLoadCompleted",
@@ -115,6 +116,7 @@ _evt_list = [
115 "bb.event.NoProvider", 116 "bb.event.NoProvider",
116 "bb.event.ParseCompleted", 117 "bb.event.ParseCompleted",
117 "bb.event.ParseProgress", 118 "bb.event.ParseProgress",
119 "bb.event.ParseStarted",
118 "bb.event.RecipeParsed", 120 "bb.event.RecipeParsed",
119 "bb.event.SanityCheck", 121 "bb.event.SanityCheck",
120 "bb.event.SanityCheckPassed", 122 "bb.event.SanityCheckPassed",
@@ -231,19 +233,30 @@ def main(server, eventHandler, params):
231 # pylint: disable=protected-access 233 # pylint: disable=protected-access
232 # the code will look into the protected variables of the event; no easy way around this 234 # the code will look into the protected variables of the event; no easy way around this
233 235
234 # we treat ParseStarted as the first event of toaster-triggered
235 # builds; that way we get the Build Configuration included in the log
236 # and any errors that occur before BuildStarted is fired
237 if isinstance(event, bb.event.ParseStarted): 236 if isinstance(event, bb.event.ParseStarted):
238 if not (build_log and build_log_file_path): 237 if not (build_log and build_log_file_path):
239 build_log, build_log_file_path = _open_build_log(log_dir) 238 build_log, build_log_file_path = _open_build_log(log_dir)
239
240 buildinfohelper.store_started_build(build_log_file_path)
241 buildinfohelper.set_recipes_to_parse(event.total)
240 continue 242 continue
241 243
242 if isinstance(event, bb.event.BuildStarted): 244 # create a build object in buildinfohelper from either BuildInit
243 if not (build_log and build_log_file_path): 245 # (if available) or BuildStarted (for jethro and previous versions)
244 build_log, build_log_file_path = _open_build_log(log_dir) 246 if isinstance(event, (bb.event.BuildStarted, bb.event.BuildInit)):
247 buildinfohelper.save_build_name_and_targets(event)
245 248
246 buildinfohelper.store_started_build(event, build_log_file_path) 249 # get additional data from BuildStarted
250 if isinstance(event, bb.event.BuildStarted):
251 buildinfohelper.save_build_layers_and_variables()
252 continue
253
254 if isinstance(event, bb.event.ParseProgress):
255 buildinfohelper.set_recipes_parsed(event.current)
256 continue
257
258 if isinstance(event, bb.event.ParseCompleted):
259 buildinfohelper.set_recipes_parsed(event.total)
247 continue 260 continue
248 261
249 if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)): 262 if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)):
@@ -289,10 +302,6 @@ def main(server, eventHandler, params):
289 # timing and error informations from the parsing phase in Toaster 302 # timing and error informations from the parsing phase in Toaster
290 if isinstance(event, (bb.event.SanityCheckPassed, bb.event.SanityCheck)): 303 if isinstance(event, (bb.event.SanityCheckPassed, bb.event.SanityCheck)):
291 continue 304 continue
292 if isinstance(event, bb.event.ParseProgress):
293 continue
294 if isinstance(event, bb.event.ParseCompleted):
295 continue
296 if isinstance(event, bb.event.CacheLoadStarted): 305 if isinstance(event, bb.event.CacheLoadStarted):
297 continue 306 continue
298 if isinstance(event, bb.event.CacheLoadProgress): 307 if isinstance(event, bb.event.CacheLoadProgress):