summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-02-16 17:47:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-20 12:58:19 +0000
commitc368d83bd6b34c2420c3d1d7269d8dc2edba1ce9 (patch)
treed6a905444fe2ea0f0313bc4b848430108ac17388 /bitbake/lib/bb/ui/toasterui.py
parenta574f293fe16612df446d3b7fef71adcab4773e9 (diff)
downloadpoky-c368d83bd6b34c2420c3d1d7269d8dc2edba1ce9.tar.gz
poky-c368d83bd6b34c2420c3d1d7269d8dc2edba1ce9.tar.bz2
poky-c368d83bd6b34c2420c3d1d7269d8dc2edba1ce9.zip
bitbake: toaster: bitbake cooker log saving and downloading
This patch brings in cooker log saving and proper download links. * toasterui will now write the cooker log file if running in managed mode * the BuildRequest has a new state, REQ_ARCHIVE, indicating that the build is completed, and the artifacts are ready to be grabbed * the runbuild test execution commands will gather needed artifacts, and save them to a storage directory selected during Toaster setup. * the build dashboard, project builds and all builds pages have permanent links for the cooker log [YOCTO #7220] [YOCTO #7206] (Bitbake rev: fad80e36c9da663b000cdf2cb3c75440c6431d84) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r--bitbake/lib/bb/ui/toasterui.py29
1 files changed, 27 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index a85ad5a06a..df9f362284 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -58,7 +58,12 @@ def _log_settings_from_server(server):
if error:
logger.error("Unable to get the value of BBINCLUDELOGS_LINES variable: %s" % error)
raise BaseException(error)
- return includelogs, loglines
+ consolelogfile, error = server.runCommand(["getVariable", "BB_CONSOLELOG"])
+ if error:
+ logger.error("Unable to get the value of BB_CONSOLELOG variable: %s" % error)
+ raise BaseException(error)
+ return includelogs, loglines, consolelogfile
+
def main(server, eventHandler, params ):
@@ -71,7 +76,7 @@ def main(server, eventHandler, params ):
console.setFormatter(format)
logger.addHandler(console)
- includelogs, loglines = _log_settings_from_server(server)
+ includelogs, loglines, consolelogfile = _log_settings_from_server(server)
# verify and warn
build_history_enabled = True
@@ -96,6 +101,16 @@ def main(server, eventHandler, params ):
buildinfohelper = BuildInfoHelper(server, build_history_enabled)
+ if buildinfohelper.brbe is not None and consolelogfile:
+ # if we are under managed mode we have no other UI and we need to write our own file
+ bb.utils.mkdirhier(os.path.dirname(consolelogfile))
+ conlogformat = bb.msg.BBLogFormatter(format_str)
+ consolelog = logging.FileHandler(consolelogfile)
+ bb.msg.addDefaultlogFilter(consolelog)
+ consolelog.setFormatter(conlogformat)
+ logger.addHandler(consolelog)
+
+
while True:
try:
event = eventHandler.waitEvent(0.25)
@@ -115,8 +130,12 @@ def main(server, eventHandler, params ):
if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)):
buildinfohelper.update_and_store_task(event)
+ logger.warn("Logfile for task %s" % event.logfile)
continue
+ if isinstance(event, bb.build.TaskBase):
+ logger.info(event._message)
+
if isinstance(event, bb.event.LogExecTTY):
logger.warn(event.msg)
continue
@@ -162,7 +181,12 @@ def main(server, eventHandler, params ):
if isinstance(event, bb.event.CacheLoadCompleted):
continue
if isinstance(event, bb.event.MultipleProviders):
+ logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "",
+ event._item,
+ ", ".join(event._candidates))
+ logger.info("consider defining a PREFERRED_PROVIDER entry to match %s", event._item)
continue
+
if isinstance(event, bb.event.NoProvider):
return_value = 1
errors = errors + 1
@@ -229,6 +253,7 @@ def main(server, eventHandler, params ):
buildinfohelper.store_log_event(event)
errors += 1
errorcode = 1
+ logger.error("Command execution failed: %s", event.error)
buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
buildinfohelper.close(errorcode)