]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: toasterui Add ParseStarted/ParseProgress events to mask
authorbrian avery <avery.brian@gmail.com>
Tue, 17 Nov 2015 16:47:56 +0000 (16:47 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Dec 2015 09:03:35 +0000 (09:03 +0000)
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>
bitbake/lib/bb/ui/toasterui.py

index c5bf715ea52bc92b32aa645ad4db5bc67c80a757..435cc2b30413b82cfa51f6c6d7e2e596a8d360d4 100644 (file)
@@ -92,6 +92,15 @@ def _close_build_log(build_log):
         build_log.close()
         logger.removeHandler(build_log)
 
+_evt_list = [ "bb.runqueue.runQueueExitWait", "bb.event.LogExecTTY", "logging.LogRecord",
+              "bb.build.TaskFailed", "bb.build.TaskBase", "bb.event.ParseStarted",
+              "bb.event.ParseProgress", "bb.event.ParseCompleted", "bb.event.CacheLoadStarted",
+              "bb.event.CacheLoadProgress", "bb.event.CacheLoadCompleted", "bb.command.CommandFailed",
+              "bb.command.CommandExit", "bb.command.CommandCompleted",  "bb.cooker.CookerExit",
+              "bb.event.MultipleProviders", "bb.event.NoProvider", "bb.runqueue.sceneQueueTaskStarted",
+              "bb.runqueue.runQueueTaskStarted", "bb.runqueue.runQueueTaskFailed", "bb.runqueue.sceneQueueTaskFailed",
+              "bb.event.BuildBase", "bb.build.TaskStarted", "bb.build.TaskSucceeded", "bb.build.TaskFailedSilent"]
+
 def main(server, eventHandler, params):
     # set to a logging.FileHandler instance when a build starts;
     # see _open_build_log()
@@ -115,6 +124,9 @@ def main(server, eventHandler, params):
     console.setFormatter(formatter)
     logger.addHandler(console)
     logger.setLevel(logging.INFO)
+    llevel, debug_domains = bb.msg.constructLogOptions()
+    server.runCommand(["setEventMask", server.getEventHandle(), llevel, debug_domains, _evt_list])
+
 
     # verify and warn
     build_history_enabled = True
@@ -182,8 +194,6 @@ def main(server, eventHandler, params):
                 continue
 
             if isinstance(event, bb.event.BuildStarted):
-                # command-line builds don't fire a ParseStarted event,
-                # so we have to start the log file for those on BuildStarted instead
                 if not (build_log and build_log_file_path):
                     build_log, build_log_file_path = _open_build_log(log_dir)