This repository contains files used for testing Fedora Java packages using the
tool javapackages-validator
and to store configuration files for that tool.
src/
-- Configuration .java
files, described later.jp_validator.sh
-- The script which calls the validator tool.tests.fmf
-- The main .fmf
file containing metadata for all tests.The test uses an optional environment variable, TEST_ARTIFACTS
, which can used
to specify the path to RPMs. This allows local test execution.
The test analyzes the contents of .rpm
files. The framework used by Fedora
provides a standard location /var/share/test-artifacts
which contains all the
RPMs of the package that is being tested.
Unless overriden, tests obtain the image javapckages-validator
from quay.io
and execute it using podman
. This is done in jp_validator.sh
.
The behaviour of the tests is configured in 3 places:
.fmf
configuration files used in each package repository. We strive to
keep them as small as possible.Custom test configuration is handled by using standard Java interfaces. The tests refer to interfaces and the actual implementations are compiled by validator.
Implementation is then obtained using reflection by constructing configuration classes using an empty constructor. Validator detects which interfaces the compiled classes implement and uses this information to configure checks.
It is possible to use multiple configurations for a simple check. In that case, the check is executed as many times as the number of configuration classes that resulted from compilation of the config sources.