[poky] Building and deploying test binaries

Connor Imes cimes at isi.edu
Fri Mar 8 10:34:52 PST 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20190308/2a12130a/attachment.html>


More information about the poky mailing list