Bug 9852

Summary: Use the eventreplay mechanism for testing
Product: [Build System, Metadata & Runtime] Toaster Reporter: brian avery <brian.avery>
Component: toasterAssignee: Ed Bartosh <eduard.bartosh>
Status: RESOLVED FIXED QA Contact: Libertad <libertad.gonzalez.de.la.cruz>
Severity: enhancement    
Priority: Medium CC: belen.barros.pena, jessica.zhang, stanciux.mihail
Version: 2.2   
Target Milestone: 2.3 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description brian avery 2016-06-29 16:12:35 UTC
The eventreplay mechanism lets us send a stream of events to toaster.  It goes through the same functional chain as "real" events from bitbake aka toaster.bbclass->buildinfohelper->ToasterDb.
Because of this it makes a nice way of testing the build/bitbake interaction side of toaster.

We need:
1) event files for testing (at leat 2 scenarios so we are sure the methid can be extended in the future)
2)artifact files related to those event files
3) scripts to run the tests.

These tests should be able to be run from the command line.  Likely the tests will reside in a separate repo as they are quite large.  Perhaps the script should have the option to pull them?


We should also think about how they will interact with the selenium test set since that would seem to be a good way to check the state after running the events.
Comment 1 Ed Bartosh 2016-10-21 09:01:47 UTC
Tests are written and tested. You can see them in my contrib branch: https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=ed/toaster/tests/eventreplay (last 3 commits)

I'll submit them for review after Michael's fix for signal_runbuilds is merged as my tests depend on it.
Comment 2 Ed Bartosh 2016-10-31 10:27:48 UTC
Implementation of 2 eventreplay tests has been sent to toaster mailing list for review: https://lists.yoctoproject.org/pipermail/toaster/2016-October/005277.html
Comment 3 Ed Bartosh 2016-11-04 12:45:39 UTC
The patchset has been accepted to bitbake&poky master branches.