diff options
author | 2015-10-15 15:45:13 +0300 | |
---|---|---|
committer | 2015-10-16 14:13:22 +0100 | |
commit | 93f0b61749155ba600f38dff5604a68da548c486 (patch) | |
tree | a38fc2e85a104f2b3b4b1665b0e5251563547c2d /bitbake/lib/bb/ui | |
parent | 069a611097265c0100582dfb69dfdddbc08a31fc (diff) | |
download | poky-93f0b61749155ba600f38dff5604a68da548c486.tar.gz poky-93f0b61749155ba600f38dff5604a68da548c486.tar.bz2 poky-93f0b61749155ba600f38dff5604a68da548c486.zip |
bitbake: toaster: Record critical errors
Critical errors (where a build failed for reasons of
misconfiguration, such as a machine being specified which is not
in a project's layers) were being ignored (only log records
up to ERROR level were being logged to Toaster's db). This meant that
the build would fail but would not correctly report why.
Add support for CRITICAL error levels to the LogMessage model,
include errors at this level in the errors property for a build,
and show errors at this level in the build dashboard.
[YOCTO #8320]
(Bitbake rev: b6eacbca9cacb607de864ab7d093deb296da8226)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 5 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index a8c884de37..286fb6a74b 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -1394,7 +1394,9 @@ class BuildInfoHelper(object): log_information = {} log_information['build'] = self.internal_state['build'] - if event.levelno == formatter.ERROR: + if event.levelno == formatter.CRITICAL: + log_information['level'] = LogMessage.CRITICAL + elif event.levelno == formatter.ERROR: log_information['level'] = LogMessage.ERROR elif event.levelno == formatter.WARNING: log_information['level'] = LogMessage.WARNING @@ -1407,6 +1409,7 @@ class BuildInfoHelper(object): log_information['pathname'] = event.pathname log_information['lineno'] = event.lineno logger.info("Logging error 2: %s", log_information) + self.orm_wrapper.create_logmessage(log_information) def close(self, errorcode): diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index dbe0d0980a..0ed774ee7b 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py @@ -145,10 +145,12 @@ def main(server, eventHandler, params ): event.levelno = formatter.ERROR buildinfohelper.store_log_event(event) + if event.levelno >= formatter.ERROR: errors = errors + 1 elif event.levelno == formatter.WARNING: warnings = warnings + 1 + # For "normal" logging conditions, don't show note logs from tasks # but do show them if the user has changed the default log level to # include verbose/debug messages |