Package me.ahoo.cosid.store.tck
Class ContractsRan
java.lang.Object
me.ahoo.cosid.store.tck.ContractsRan
Checks from the JUnit XML reports of a backend that its contract cases really ran (roadmap R2: a CI job that
silently skipped its backend must fail). For each contract, some test class extending it must have reported every
case of the contract as passed; a case marked
OptionalCapability may be skipped.
Run it on the test runtime classpath of the backend, after its tests:
ContractsRan <report dir> [contract class ...]; the contracts default to RangeStoreContract and
SlotLeaseStoreContract. It exits with status 1 and lists the problems when a case did not run.
-
Method Summary
-
Method Details
-
main
Checks the reports inargs[0]against the contracts named by the other arguments.- Parameters:
args- the report directory, then the contract classes- Throws:
Exception- if a report or a class cannot be read
-
check
public static List<String> check(Path reportDir, List<Class<?>> contracts, ClassLoader classLoader) throws IOException Lists the contract cases that no report shows as run.- Parameters:
reportDir- the directory of theTEST-*.xmlreportscontracts- the contract classesclassLoader- loads the test classes the reports name- Returns:
- the problems; empty when every case ran
- Throws:
IOException- if a report cannot be read
-