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.
This commit is contained in:
Ondřej Budai 2020-07-20 09:32:12 +02:00 committed by Christian Kellner
parent 58bd7a204a
commit 4b290dd2a4
5 changed files with 662 additions and 1 deletions

View file

@ -215,6 +215,7 @@ $(TEST_MANIFESTS_GEN): $(SRCDIR)/test/data/manifests/%.json: $(SRCDIR)/test/data
$(SRCDIR)/test/data/manifests/f32-base.json: $(SRCDIR)/test/data/manifests/f32-build.json
$(SRCDIR)/test/data/manifests/fedora-boot.json: $(SRCDIR)/test/data/manifests/f32-build.json
$(SRCDIR)/test/data/manifests/filesystem.json: $(SRCDIR)/test/data/manifests/f32-build.json
.PHONY: test-data
test-data: $(TEST_MANIFESTS_GEN)