This repository contains files used for testing Fedora Java packages using the
tool javapackages-validator
and to store configuration files for that tool.
config/
-- Configuration files, described later.test_scripts/
-- Shell scripts to be executed.tests.fmf
-- The main .fmf
file containing metadata for all tests.The test depends on the environment variable FMF_PACKAGE
being set. This
variable is the simple name of the package that is being tested.
Another environment variable, TEST_ARTIFACTS
, 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. It is used in common.sh
.
Tests, which require javapckages-validator
have to download it. This is done
in common-jpv.sh
. The script also compiles configuration files and sets an
environment variable of the runtime classpath needed for JP-validator to work.
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 just before testing on the host machine. Implementation is then obtained using Reflection by obtaining hardcoded instances from hardcoded classes present on the classpath.