Commit graph

37 commits

Author SHA1 Message Date
Christian Kellner
452e9ddb9e stages/rpm: include sigpgp, siggpg in metadata
Return the SIGPGP, SIGGPG fields, if available, in the packages
metadata. This is needed for the koji integration.
2020-10-22 22:47:22 +01:00
Lars Karlitski
78c251d332 test/data/stages/zipl: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.

Changed a.json to not include a zipl stage with empty options. This
breaks the test, because the osbuild run of b.json is relying on a
checkpoint of the result of a.json. If that's not present, the rpm
database (and other generated files) are marked as differing, because
the whole pipeline is generated again. This might have worked before,
because the previous package list happened to be deterministic.
2020-10-19 17:37:46 +01:00
Lars Karlitski
ec07482040 test/data/stages/users: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
8acadfc23e test/data/stages/systemd: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
064dd5fee0 test/data/stages/rpm: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
6f8f623918 test/data/stages/timezone: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
147a6a29fb test/data/stages/locale: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
a4da6e0041 test/data/stages/keymap: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
7aa8500174 test/data/stages/kernel-cmdline: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.

Changed a.json to not include a kernel-cmdline stage with empty options.
This breaks the test, because the osbuild run of b.json is relying on a
checkpoint of the result of a.json. If that's not present, the rpm
database (and other generated files) are marked as differing, because
the whole pipeline is generated again. This might have worked before,
because the previous package list happened to be deterministic.
2020-10-19 17:37:46 +01:00
Lars Karlitski
c2cec04b7c test/data/stages/hostname: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
ac02b79222 test/data/stages/groups: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
3554575659 test/data/stages/fstab: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
8904398b50 test/data/stages/firewall: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
49d1c09653 test/data/stages/copy: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
abaa49b8ae test/data/stages/chrony: use mpp to generate manifests
Also, upgrade the test to fedora-32 from https://osbuild.org/rpmrepo.
2020-10-19 17:37:46 +01:00
Lars Karlitski
2066d0fb3b test: switch to rpmrepos' repository snapshots
These are more stable, and closer to where the tests are run (in the
same AWS region).

https://www.osbuild.org/rpmrepo/
2020-10-19 17:37:46 +01:00
Lars Karlitski
d9ef44eb6d test: rename mpp-*.json to *.mpp.json
This simplifies the `test-data` rules in `Makefile` considerably. Also,
it allows adding `*.mpp.json` files in other directories without needing
to copy rules. (make's pattern-based rules only allow a single `%`).

Adjust test/data/README.md accordingly.
2020-10-19 17:37:46 +01:00
Christian Kellner
818daef6cb test/stages: metadata checks for the rpm stage
Use the new metadata checking capability of the stage tests to
check the metadata set by the rpm stage.
2020-08-13 10:50:34 +02:00
Christian Kellner
bcfc2ca29a test/data: add mount_flags.py helper script
Add a new helper script to check if a mount / file-system was
mounted with specific flags. Currently only "ro", "nosuid",
"nodev" and "noexec" flags are supported. This script is in
test/data since it will be used from other tests and is itself
not a test per se.
2020-08-12 16:52:27 +02:00
Christian Kellner
fdded58cdd test/assembler: check for ostree version metadata
Set the OS version of the commit via the new `os_version` option
and make sure that it is in the compose info as well as in the
commit metadata.
2020-08-12 08:08:17 +02:00
Davide Cavalca
38c1ed52ce test: xfs also needs a different l2hash 2020-08-04 10:49:37 +02:00
Davide Cavalca
1aeb7d3a96 test: add xfsprogs and rebuild the test-data 2020-08-04 10:49:37 +02:00
Davide Cavalca
7dc6c379a8 test: add btrfs-progs and rebuild the test data 2020-08-04 10:49:37 +02:00
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
Christian Kellner
7ac8f41798 stages/systemd: ability to mask services
Add the ability to mask services, which is done e.g. when building
installers. See systemctl(1) for more information about masked
services.
Modify the existing stage test to include a test for it.
2020-06-24 10:05:11 +02:00
Christian Kellner
54dffeaaa0 test/stage/selinux: add check for new label option
Manually set a label for '/usr/bin/cp' to 'isntall_exec_t' and
verify it has been set correctly.
2020-06-15 20:36:48 +02:00
Christian Kellner
15986d9297 test: add selinux stage test
Add a simple check for the selinux check by building the f32-base
image with an added selinux stage. Use the options from a test
json file and verify the labels against a set of labels given in
the aforementioned test file.
2020-06-15 20:36:48 +02:00
Christian Kellner
da80259ea0 test: add a test for the ostree.commit assembler
Create a ostree commit and check that it successfully was created
by inspecting the resulting `compose.json`.
2020-06-15 13:44:01 +02:00
Christian Kellner
5a54dfcf9f manifests: install rpm-ostree in the build root
Install rpm-ostree in the (mpp-)f32-build.json build manifest, so
ostree commits can be created using the same build root. Update
all affected manifests.
2020-06-15 13:44:01 +02:00
Tom Gundersen
10a9f16852 test: move all test manifests to get fedora packages from kernel mirrors
This replaces the round-robin mirror at fedoraproject.org, as that was
proving to be quite unreliable.

This is a short-term fix before add metalink support.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-06-07 22:08:34 +02:00
David Rheinsberg
d584a1e225 test: move stage-tests into test/run and test/data
Move the stage-tests over to the new test-infrastructure. This moves
the test invocation into `./test/run/test_stages.py`, so it is invoked
as part of the runtime-tests. Secondly, the test-data is stored in
./test/data/stages/ so the path is relative to
TestBase.locate_test_data().

While at it, this also drops the dynamic class modifications and instead
uses subTest(). This simplifies the code quite a bit and avoids
dynamically creating python code.
2020-06-05 09:27:40 +02:00
David Rheinsberg
9bb6123963 test: convert test_boot to runtime tests with F32
Move the `test_boot` suite into ./test/run closer to the other runtime
tests, and convert the used manifest over to an MPP based F32 manifest.
2020-06-05 09:27:40 +02:00
David Rheinsberg
6e8562f712 test: make source-tests relative to ./test/data/
This moves the `sources_tests` into ./test/data/sources/ and makes the
entire test use `locate_test_data()` to get relative paths for their
accesses.

This further improves our test cases to support running from
installments rather than local checkouts. We need access to ./test/data
guarded, so we can install packages and still have the tests access the
correct paths.

This also adjusts the HTTP-Server we use in the test to serve data
relative to a path it is handed. I now chose `./test/data`, which will
easily allow us to re-use the same HTTP-Server in the future for other
tests that require it.
2020-06-05 09:27:40 +02:00
David Rheinsberg
4b85f48b12 test: include grub2-pc in f32-build.json
We need the `grub2-pc` RPM to install grub, so make sure we provide it
in our f32-build.json manifest.
2020-06-05 09:27:40 +02:00
David Rheinsberg
020e78d571 test: import build-pipelines
Extend the `f32-base.json` manifest to use our F32 build-root. Use the
new mpp-import-pipeline preprocessor to include `f32-build.json` as
build-root.
2020-06-05 09:27:40 +02:00
David Rheinsberg
7dcc946fe2 test: add F32 manifests and a manifest-preprocessor
This adds F32 manifests in ./test/data/. To avoid magically deducing the
package list out of the void, this adds a ManifestPreProcessor (MPP)
called `./tools/mpp-depsolve.py`. What this does is it takes a manifest
on stdin, modifies it, and produces a manifest on stdout.

The `mpp-depsolve.py` preprocessor takes a manifest and modifies all the
`org.osbuild.rpm` stages. It parses a new option to that stage called
`mpp-depsolve`, which contains a package-list, a repo-list, and dnf
metadata. It then drops this `mpp-depsolve` option (since it would be an
invalid manifest otherwise), depsolves the packages, inserts a proper
"packages" option as well as appends the correct paths to the sources
entry.

With this in place, this adds `mpp-f32-base.json` and
`mpp-f32-build.json` in ./test/data/manifests/. These will then be used
as base F32 manifests for our test-suite.

Lastly, this adds `./test/data/README.md` as a place to document the
files we place in `./test/data/`, since most of the files do not allow
for comments.
2020-05-20 18:54:38 +02:00
David Rheinsberg
b830bb7480 test: convert os-release-tests to test-data
Use the new `locate_test_data()` helper to get access to test-data.
Guard the test with `have_test_data()` to skip it in case test-data
access is not available.
2020-05-13 14:26:05 +02:00