[yocto] Executing ptest using image test ?

Alexander Kanavin alexander.kanavin at linux.intel.com
Fri Nov 24 06:19:47 PST 2017


On 11/24/2017 03:59 PM, Koehler, Yannick wrote:

> I had pretty much done all that is documented under 4.21 of this
> documentation.  I can execute my test within the image using
> "ptest_runner" and I see it PASS/FAIL according to my test's content.
> So that's great, but the problem with this is still that I need to
> manually invoke qemu and initiate the ptest-runner script.  I would
> like that to occurs from within the testimage using Image test as
> describe under https://wiki.yoctoproject.org/wiki/Image_tests.  Yet
> it seems that to get image test support I need to write additional
> python test scripts which I feel is excessive and since those scripts
> are not store within the recipe folder, I feel those test are more
> MACHINE testing than package testing.
> 
> I would like to use 1 python test to execute and report the result of
> one or more ptest, in the same automatic way image test does.  I
> cannot see or connect the dot between ptest and image test by reading
> and re-reading section 4.21.

Right, I see. The unattended runtime execution of ptests should be 
performed by meta/lib/oeqa/runtime/cases/ptest.py, I don't at the moment 
remember how the pieces fit together exactly so that it runs, but I 
think if you follow what it says [1] and run bitbake -c testimage 
<image> then it should work.

[1]
     @skipIfNotFeature('ptest', 'Test requires ptest to be in 
DISTRO_FEATURES')
     @skipIfNotFeature('ptest-pkgs', 'Test requires ptest-pkgs to be in 
IMAGE_FEATURES')


Alex



More information about the yocto mailing list