debian-forge/test/data
Ondřej Budai 4b290dd2a4 test: use a dummy pipeline when testing assemblers
#471 extends the assembler test suite to also test xfs and btrfs filesystems
in raw and qemu assemblers. However, this change leads to long running times
of this suite.

The running time of these test consist of 3 main steps:

1) Building the build pipeline
2) Building the stages
3) Running the assembler

There are two optimization approaches:

1) Caching
   OSBuild supports caching, therefore it's possible to cache results of first
   two steps.

2) Minimizing the operating system tree
   Assemblers don't care about the image contents. Therefore, it's possible
   to create just a small tree which would be used to test the assemblers.
   This should lead to speed up in the step 2 (smaller tree should be built
   quicker) and in step 3 (big part of assembling is just copying files over
   to the image).

This commit implements the second approach. A new test manifest is now added,
which just installs the filesystem package and its dependencies and this tree
is then labeled. This solution was chosen, so that the assemblers get
something that looks as a proper filesystem tree but also can be built pretty
quickly.

Before this change, the test_rawfs method with #471 merged ran for 842 seconds.
After this change, it ran for 391 seconds.
2020-07-21 10:25:47 +02:00
..
manifests test: use a dummy pipeline when testing assemblers 2020-07-21 10:25:47 +02:00
os-release test: convert os-release-tests to test-data 2020-05-13 14:26:05 +02:00
sources/org.osbuild.files test: make source-tests relative to ./test/data/ 2020-06-05 09:27:40 +02:00
stages stages/systemd: ability to mask services 2020-06-24 10:05:11 +02:00
README.md test: use a dummy pipeline when testing assemblers 2020-07-21 10:25:47 +02:00

OSBuild Test Data

This directory contains data used by the osbuild test-suite. Since many formats do not allow comments, this file shortly describes their purpose.

Directories

  • ./os-release/: This directory is consumed by the unit-tests of the os-release parser. The directory contains example os-release files (see os-release(5)). Their directory name is the expected output of the parser.

  • ./manifests/: This directory contains osbuild manifests used throughout the test-suite.

    Manifests prefixed with f30, f31, etc. are manifests that produce fedora images. If they have base as part of their name, they include a base set of packages which we very loosely define as @core plus the packages our test-suite needs. If they have build as part of their name, they have a very restricted package set which includes just what is needed in a build-root for osbuild. The fedora prefix is used for manifests that are kept up to date to the newest fedora release, and thus do not expose a specific f30, f32, etc. behavior.

    The rhel prefix is used for Red Hat Enterprise Linux images. Since they are not available publicly, the test-suite usually skips them.

    The filesystem manifest is used to test assemblers. These tests doesn't need a big filesystem tree representing a whole operating system. Instead, this manifest's tree is constructed just from the filesystem package and is marked using the selinux stage.

    Manifests prefixed with mpp-* are fed through the ManifestPreProcessors and then stored in the same directory with the mpp-* prefix dropped. The generated files are committed to the repository. Nevertheless, if you need to regenerate them, use make test-data.

  • ./sources/: This directory contains test-data for runtime tests of the source-engines. It contains a directory that is served via HTTP in the tests, and a directory of test-cases what to expect when using the attached sources.json.