Bug 8515

Summary: In analysis mode, if you interrupt the bitbake build, toaster erroneously reports a successful build
Product: [Build System, Metadata & Runtime] Toaster Reporter: brian avery <brian.avery>
Component: toasterAssignee: Elliot Smith <elliot.smith>
Status: RESOLVED FIXED QA Contact: Libertad <libertad.gonzalez.de.la.cruz>
Severity: normal    
Priority: Medium CC: belen.barros.pena, jessica.zhang, stanciux.mihail
Version: 2.1   
Target Milestone: 2.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on: 6787    
Bug Blocks:    

Description brian avery 2015-10-14 23:35:36 UTC
To replicate:
1)run toaster in analysis mode
2) do bitbake bash
3) allow it to get into the tasks running (like a do_configure or 2)
4)Ctrl-c the bitbake. Toaster shows a green build.

Bitbake cli says:
Keyboard Interrupt, closing down...

NOTE: Tasks Summary: Attempted 202 tasks of which 0 didn't need to be rerun and all succeeded.
ERROR: Command execution failed: Stopped build

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Execution was interrupted, returning a non-zero exit code.
Comment 1 Elliot Smith 2016-03-09 15:54:04 UTC
Builds interrupted on the command line count as cancelled and need the same design (i.e. https://bugzilla.yoctoproject.org/attachment.cgi?id=2706), hence the dependency on bug 6787.
Comment 2 Belen Barros Pena 2016-04-25 15:36:27 UTC
I just tried this. The builds started from cli that you cancel no longer show as failed: they just stay forever as running, until you stop Toaster. When you restart Toaster, they show as failed.
Comment 3 Elliot Smith 2016-04-27 15:13:57 UTC
Submitted for review:
https://lists.yoctoproject.org/pipermail/toaster/2016-April/004511.html
Comment 4 Elliot Smith 2016-04-27 15:15:15 UTC
The old BuildCompleted event with an _interrupted flag no longer appears to be fired, which is what I was previously using to notice when the bitbake build was interrupted.

Needs further work to figure out if there's now an event for interrupted builds which we could cancel (might need to change the event mask to be able to see this).
Comment 5 Elliot Smith 2016-04-29 13:10:59 UTC
Sent v2 for review:
https://lists.yoctoproject.org/pipermail/toaster/2016-April/004521.html
Comment 6 Elliot Smith 2016-05-17 14:58:45 UTC
Now in bitbake master.