1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
Building Build Tests
====================
{kiwi} provides a collection of integration test images for
different architectures and distributions. The test descriptions
cover a number of appliance features that can be built with {kiwi}.
The test descriptions are stored in a directory structure of the
following layout: `build-tests/ARCH/DISTRIBUTION/test-image-NAME`.
To build integration test image(s), the script `build-tests.sh`
exists.
The implementation of `build-tests.sh` calls kiwi's `boxbuild`
command in container mode, which allows calling the script on
any host system that allows you to run container instances
via `podman`.
.. warning:: **Architectures**
Cross-architecture image building is possible and also supported
via boxbuild, but the performance impact is big, even in containers
using qemu-binfmt, and even bigger in full qemu arch emulation.
This would slow down building the integration tests a lot, and
therefore, `build-tests.sh` requires the host architecture to
match the image target architecture.
Prior to calling `build-tests.sh`, the following requirements must be met:
``Tools``
Install the packages providing the following tools:
* tree
* git
* xmllint
* podman
* pip
``Source Checkout``
Check out the kiwi git repo, which provides the test descriptions
as well as the `build-tests.sh` script.
.. code:: bash
$ git clone https://github.com/OSInside/kiwi.git
``kiwi-boxed-plugin``
Fetch the `kiwi-boxed-plugin` from pip. It provides the boxbuild
command used by `build-tests.sh`.
.. code:: bash
$ pip install --upgrade kiwi-boxed-plugin
.. warning::
Make sure to be able to execute `kiwi-ng`. In case there was no {kiwi}
installed on your host, you will be notified by the kiwi-boxed-plugin
installation to update your path to `export PATH:~/.local/bin/kiwi-ng:$PATH`.
If in doubt about all this, just install kiwi from pip too.
`pip install --upgrade kiwi`
Building a specific integration test can be done as follows:
.. code:: bash
$ cd kiwi
$ ./build-tests.sh \
--test-dir build-tests/x86/tumbleweed/ \
--test-name test-image-disk
Building all integration tests for a specific arch and distribution
can be done as follows:
.. code:: bash
$ cd kiwi
$ ./build-tests.sh \
--test-dir build-tests/x86/tumbleweed/
.. note::
Building all integration tests can take some time and depends
on the number of tests provided as well as on the build power
of the host system. In general, the tests can also run in
parallel or be distributed to multiple hosts.
|