OTA Connect Developer Guide

Testing meta-updater

This page describes the tools available to test meta-updater in an automated fashion.

QA with oe-selftest

meta-updater uses the oe-selftest framework for quality assurance. Currently, you will need to run this in a build directory with MACHINE set to qemux86-64. Follow the steps below to run the tests:

  1. Append the line below to conf/local.conf to disable the warning about supported operating systems:

    SANITY_TESTED_DISTROS = ""
  2. If your image does not already include an ssh daemon such as dropbear or openssh, add this line to conf/local.conf as well:

    IMAGE_INSTALL_append = " dropbear "
  3. Some tests require that SOTA_PACKED_CREDENTIALS is set in your conf/local.conf. See the build configuration page for more details.

  4. To be able to build an image for the GRUB tests, you will need to install the ovmf package. This is described in the meta-updater README.

  5. Run oe-selftest:

    oe-selftest -r updater_native updater_qemux86_64 updater_minnowboard updater_raspberrypi updater_qemux86_64_ptest

For more information about oe-selftest, including details about how to run individual test modules or classes, please refer to the Yocto Project wiki.

Aktualizr test suite with ptest

The meta-updater layer includes support for running parts of the aktualizr test suite on deployed devices through Yocto’s ptest functionality. Since it adds significant build time cost, it is currently disabled by default. To enable it, add the following to your conf/local.conf:

PTEST_ENABLED_pn-aktualizr = "1"
IMAGE_INSTALL_append += " aktualizr-ptest ptest-runner "

Be aware that it will add several hundreds of MB to the generated file system.

The aktualizr tests will now be part of the deployed ptest suite, which can be run by calling ptest-runner. Alternatively, the required files and run script can be found in /usr/lib/aktualizr/ptest.