Test-remote-image

From Yocto Project
Revision as of 12:36, 15 July 2014 by Corneliu Stoicescu (talk | contribs) (Created page with "DESCRIPTION Yocto already offers the possibility to test a locally built image by setting the right configuration in conf/local.conf but sometimes testing a remotely built image ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

DESCRIPTION Yocto already offers the possibility to test a locally built image by setting the right configuration in conf/local.conf but sometimes testing a remotely built image is required. Such cases include testing official images for validation. For this purpose we made a script that: - fetches remote images required for testing - runs the runtime tests using testimage and all its features

The script can be found in the poky/scripts directory that is available in the PATH environment variable after sourcing into a build directory/environment.

USAGE Using the test-remote-image-script was meant to be easy and add as little extra configuration as possible. As a result, the required default steps are: 1) create the build configuration just like creating the image locally and running the tests on it(but do not build the actual image) 2) instead of using bitbake to build the image or start the tests, use the script. It will require the user to supply some parameters, some of them being optional. Following are some of the options used and their meaning, the rest can be understood using the --help option: --image-types = a list of iamge types to be tested (ex: core-image-minmal core-image-sato) --repo-link = link to the images repository --required-packages = packages that should be built before testing. For example, the psplash and rpm packages are used for 'smart' testing.

ADVANCED USAGE

  • Target configuration

The script is made to work with most target types(read: MACHINE) by interacting the Target Controller used to test that target. For this end we defined target profiles that tells the script what images it should fetch for a given target and an AutoTargetProfile was implemented to automate as much of this as possible. If this profile does not work for a given target, a new target profile should be implemented and selected from the script command line using the --target-profile option. This target profile class should extend the BaseTargetProfile abstract class and make sure the abstract methods are implemented as described in the script comments.

  • Repository configuration

Similarly to the target profiles, the script uses repo profiles for