Bug 4435

Summary: Rework qemuimagetest implementation
Product: [QA/Testing] Runtime Testing Reporter: Paul Eggleton <bluelightning>
Component: generalAssignee: Stefan Stanacar <sstncr>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: alexandrux.palalau, sgw, venkatarg
Version: 1.5   
Target Milestone: 1.5   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)
Bug Depends on:    
Bug Blocks: 4137, 4686    

Description Paul Eggleton 2013-04-29 15:44:40 UTC
Evaluate the current qemuimagetest implementation and look at rewriting it using a proper testing framework such as python's unittest. We need to satisfy the following requirements:

* Preserve the current logic for launching QEMU since it has gone through a lot of revision; however rather than being driven from each test, it would be better for us to have the launching code run once at the start of testing each image and then shut down once at the end rather than doing this in every test case.

* Handle tests against different image types (presumably skip certain tests based checking for the presence/absence of some file in the rootfs)

* Reduce the amount of boilerplate for each test - the less work required to add a test the easier it will be to increase our level of automation.
Comment 1 Stefan Stanacar 2013-07-18 16:15:45 UTC
A new class (testimage.bbclass) has been added which can start qemu images, and run a series of python unittests (which replace the runtime scripts found in the old qemuimagetest). 
Initial commits were from 1328d49625e0030e00d09d74d35f57bd87b14a04 till 4285e856aa073979bf046168a75188ccf5a1e7d4.
Some improvements went in 46d3bb502f01f1d0bde967f029a988447c7e6e28 till 3dee534f1e25109e0bdb681de0746c336f4b8840.

That last commit 3dee534f1e25109e0bdb681de0746c336f4b8840 was also run through AB on a weekly build:

http://autobuilder.yoctoproject.org:8011/builders/nightly-x86-64/builds/209/steps/Running%20Sanity%20Tests/logs/stdio
http://autobuilder.yoctoproject.org:8011/builders/nightly-ppc/builds/212/steps/Running%20Sanity%20Tests/logs/stdio

So I guess at this point the basic implementation is done.
Comment 2 Alexandru Palalau 2013-09-17 09:13:57 UTC
Verified on master branch.
Commit ID: 566ca1e4769b4ec7e3f6c6a98bb817db2221cf82