summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian avery <avery.brian@gmail.com>2015-11-17 16:47:56 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-09 09:03:35 (GMT)
commit7e8ff7b9d793b7be106415c3c80b687977217566 (patch)
tree998a20e6e317b80b97fe726d7286723614fd3d98
parentf823601845597df59b7951a728ea0371a28102cd (diff)
downloadpoky-7e8ff7b9d793b7be106415c3c80b687977217566.tar.gz
bitbake: toaster: toasterui Add ParseStarted/ParseProgress events to mask
Toaster is not able to see ParseStarted and ParseProgress events for command-line builds. This means it's not possible for Toaster to detect failed builds, if the failure occurs at a point before the BuildStarted event, as the build won't show up at all. Add these events to the event mask, so that Toaster's toasterui can detect and respond to them. (Bitbake rev: 16bfd3e3d145705a2b3a05648ddbcacc7a338dfa) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/ui/toasterui.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index c5bf715..435cc2b 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -92,6 +92,15 @@ def _close_build_log(build_log):
92 build_log.close() 92 build_log.close()
93 logger.removeHandler(build_log) 93 logger.removeHandler(build_log)
94 94
95_evt_list = [ "bb.runqueue.runQueueExitWait", "bb.event.LogExecTTY", "logging.LogRecord",
96 "bb.build.TaskFailed", "bb.build.TaskBase", "bb.event.ParseStarted",
97 "bb.event.ParseProgress", "bb.event.ParseCompleted", "bb.event.CacheLoadStarted",
98 "bb.event.CacheLoadProgress", "bb.event.CacheLoadCompleted", "bb.command.CommandFailed",
99 "bb.command.CommandExit", "bb.command.CommandCompleted", "bb.cooker.CookerExit",
100 "bb.event.MultipleProviders", "bb.event.NoProvider", "bb.runqueue.sceneQueueTaskStarted",
101 "bb.runqueue.runQueueTaskStarted", "bb.runqueue.runQueueTaskFailed", "bb.runqueue.sceneQueueTaskFailed",
102 "bb.event.BuildBase", "bb.build.TaskStarted", "bb.build.TaskSucceeded", "bb.build.TaskFailedSilent"]
103
95def main(server, eventHandler, params): 104def main(server, eventHandler, params):
96 # set to a logging.FileHandler instance when a build starts; 105 # set to a logging.FileHandler instance when a build starts;
97 # see _open_build_log() 106 # see _open_build_log()
@@ -115,6 +124,9 @@ def main(server, eventHandler, params):
115 console.setFormatter(formatter) 124 console.setFormatter(formatter)
116 logger.addHandler(console) 125 logger.addHandler(console)
117 logger.setLevel(logging.INFO) 126 logger.setLevel(logging.INFO)
127 llevel, debug_domains = bb.msg.constructLogOptions()
128 server.runCommand(["setEventMask", server.getEventHandle(), llevel, debug_domains, _evt_list])
129
118 130
119 # verify and warn 131 # verify and warn
120 build_history_enabled = True 132 build_history_enabled = True
@@ -182,8 +194,6 @@ def main(server, eventHandler, params):
182 continue 194 continue
183 195
184 if isinstance(event, bb.event.BuildStarted): 196 if isinstance(event, bb.event.BuildStarted):
185 # command-line builds don't fire a ParseStarted event,
186 # so we have to start the log file for those on BuildStarted instead
187 if not (build_log and build_log_file_path): 197 if not (build_log and build_log_file_path):
188 build_log, build_log_file_path = _open_build_log(log_dir) 198 build_log, build_log_file_path = _open_build_log(log_dir)
189 199