Commit Graph

3 Commits

Author SHA1 Message Date
Tomáš Hozza
bda943d73c
Test: install pytest from pip
pytest version available in RHEL repos (especially on el8) is too old to
be used with osbuild tests and how we execute them. In order to keep the
test implementation the same across all distributions and their
versions, install pytest from pip and not system repositories.

Related: rhbz#2174847

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-04-24 21:38:03 +02:00
Tomáš Hozza
eac3dd265a
Test: simplify SRC_DIR extraction in run-unit-tests.sh
Use `spectool`, instead of `rpmdev-spectool`, because it is available
only on c9s and el9 and the intention was to keep tests implementation
the same across all distributions and their versions. This makes the
test case identical to c8s / el8.

In addition, the output from the tool differs on c8s and c9s, therefore
simplify the extraction of the SRC_DIR using only one sed command, which
produces the desired output on c8s and c9s.

Related: rhbz#2174847

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-04-24 21:02:57 +02:00
Tomáš Hozza
288b280073
Test: rework execution of unit-tests
We have been running just a subset of osbuild unit tests and also not as
a root, so some of them would be skipped.

In addition, the downstream patches were never applied on sources which
were used for unit-testing. Thus if any issue with test was just
backported as a patch, this had no effect on the test result.

Rework how tests are executed by using a dedicated script which will
take care of the installation of test dependencies, preparation of
sources including application of downstream patches and execute all unit
tests.

Rework also the FMF test metadata and test discovery.

Related: rhbz#2174847

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-04-21 17:49:23 +02:00