Debian Codegraph @

doc/source/integration_testing.rst

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