This project contains the interface for using javapackages-validator.
A custom validator must inherit from the org.fedoraproject.javapackages.validator.spi.Validator
class and have its name listed in the service file on the class path of the program.
Custom validators can override functions:
String getTestName()
-
The name of the test. Names of different tests must be unique and must start with a
/
. Result validate(Iterable<RpmPackage> rpms, List<String> args)
-
Validate the RPM files and produce a Result describing what was checked. The validator is supposed fill its result with log entries as it is being executed. The list of arguments
args
is passed whether from command line or from a configuration file. This function should wrap any thrown exceptions in the returned result as theerror
log entry. For details, see the section Result states.
The result of validator execution. Must implement the following methods:
TestResult getResult()
-
The state of this result as described in Result states.
Iterator<LogEntry> iterator()
-
A method for accessing the log entries of this result.
skip
|
Validator was not executed. |
pass
|
All validator checks passed. |
info
|
Validator provided some informational message. For example the values of some attributes of the RPM. This can also mean that the property being tested was not present in the RPM. |
warn
|
Validator ran successfully but some non-essential routine failed. |
fail
|
Some validator checks failed. |
error
|
An error occured, which prevented the validator from running. For example invalid input or an unexpected state. |