diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-05-01 16:42:39 +0100 |
---|---|---|
committer | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-05-01 17:37:37 +0100 |
commit | af63abe88327fd5c1b3d7c00a84d9e408ef23285 (patch) | |
tree | 809914d146e8df3331ae362c149a601d191265a0 /lib | |
parent | 1ddd6a9e4280a4adf971132ff1fe7ec9b3252905 (diff) | |
download | bitbake-af63abe88327fd5c1b3d7c00a84d9e408ef23285.tar.gz |
toasterui: close build on BuildCompleted event
Moving the code to close the build and instantiate a fresh
buildinfohelper object to BuildCompleted event, as the
CommandCompleted/Failed/Exit events come in too early.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/ui/toasterui.py | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py index 6a7a1cd17..30540483c 100644 --- a/lib/bb/ui/toasterui.py +++ b/lib/bb/ui/toasterui.py @@ -236,22 +236,7 @@ def main(server, eventHandler, params ): continue if isinstance(event, (bb.event.BuildCompleted)): - continue - - if isinstance(event, (bb.command.CommandCompleted, - bb.command.CommandFailed, - bb.command.CommandExit)): - errorcode = 0 - if (isinstance(event, bb.command.CommandFailed)): - event.levelno = format.ERROR - event.msg = "Command Failed " + event.error - event.pathname = "" - event.lineno = 0 - buildinfohelper.store_log_event(event) - errors += 1 - errorcode = 1 - logger.error("Command execution failed: %s", event.error) - + # update the build info helper on BuildCompleted, not on CommandXXX buildinfohelper.update_build_information(event, errors, warnings, taskfailures) buildinfohelper.close(errorcode) # mark the log output; controllers may kill the toasterUI after seeing this log @@ -271,6 +256,23 @@ def main(server, eventHandler, params ): continue + if isinstance(event, (bb.command.CommandCompleted, + bb.command.CommandFailed, + bb.command.CommandExit)): + errorcode = 0 + if (isinstance(event, bb.command.CommandFailed)): + event.levelno = format.ERROR + event.msg = "Command Failed " + event.error + event.pathname = "" + event.lineno = 0 + buildinfohelper.store_log_event(event) + errors += 1 + errorcode = 1 + logger.error("Command execution failed: %s", event.error) + + + continue + if isinstance(event, bb.event.MetadataEvent): if event.type == "SinglePackageInfo": buildinfohelper.store_build_package_information(event) |