[poky] Building and deploying test binaries

Alexander Kanavin alex.kanavin at gmail.com
Fri Mar 8 11:25:44 PST 2019


I'd say a special image for testing is *exactly* what you need. You
might take the existing image recipe, and include it wholesale into
your testing image recipe, then add additional recipes as needed. Then
the testing image is guaranteed to be an extension of the plain image.
Example:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb

Generally, creating various types of images serving various purposes
is not only ok, but is encouraged - YP isn't able to carry this
message across to users very well :-/

Alex

On Fri, 8 Mar 2019 at 21:36, Connor Imes <cimes at isi.edu> wrote:
>
> Hi all,
>
>
>
> We have some applications that are meant exclusively for testing, and so do not want to include them by default in our image’s rootfs.  It also does not seem appropriate to build a separate image for testing.  After much searching, it seems like the JSON-based approach described here [1] is appropriate to automatically load/remove the binaries at runtime for use during testing.  I’ve written some recipes to build our test binaries, then specified their packages as dependencies using JSON files for our Python oeqa runtime test cases.  If I build the recipes with bitbake, the tests then execute successfully when I run `bitbake <image> -c testimage`.
>
>
>
> [1] https://www.yoctoproject.org/docs/2.6/dev-manual/dev-manual.html#installing-packages-in-the-dut-without-the-package-manager
>
>
>
> The problem is that we currently have to specify each of these recipes to bitbake so they can built prior to testing, thus requiring a priori knowledge of which recipes our tests depend on.  This manual dependency management is error-prone and won’t scale well.  Is there a way for bitbake to discover these dependencies automatically prior to running `testimage` (which subsequently fails if the dependencies specified in the JSON files aren’t already built)?  Ideally we should be able to manage these recipes similarly to others used to build and populate the rootfs - fetch sources while we’re online, then build offline, then run the tests anytime thereafter.  Something like:
>
>   bitbake <image> -c testimage --runall="fetch"  # download sources (currently fetches some things, but not JSON-specified recipes?)
>
>   bitbake <image> -c testimage --runall="build"  # build/install/etc all test-related recipes
>
>   bitbake <image> -c testimage  # do the actual runtime test
>
>
>
> Thanks,
>
> -Connor
>
> --
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


More information about the poky mailing list