File: integration_testing.rst

package info (click to toggle)
kiwi 10.2.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 7,664 kB
  • sloc: python: 69,179; sh: 4,228; xml: 3,383; ansic: 391; makefile: 353
file content (87 lines) | stat: -rw-r--r-- 2,627 bytes parent folder | download | duplicates (2)
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
covers a number of appliance features that can be build 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
actually any host system that allows 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 with the image target architecture.

Prior 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``

  Checkout 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 get 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 distributed to multiple hosts