package org.jenkinsci.plugins.p4; import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; import java.io.File; public class SampleServerRule extends SimpleTestServer implements TestRule { public SampleServerRule(String root, String version) { super(root, version); } @Override public Statement apply(Statement statement, Description description) { return new ServerStatement(statement); } public class ServerStatement extends Statement { private final Statement statement; public ServerStatement(Statement statement) { this.statement = statement; } @Override public void evaluate() throws Throwable { clean(); extract(new File(getResources() + "/depot.tar.gz")); restore(new File(getResources() + "/checkpoint.gz")); upgrade(); statement.evaluate(); destroy(); } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 23650 | abraka | "Forking branch Main of p4-jenkins to mautokar-p4jenkins." | ||
//guest/perforce_software/p4jenkins/main/src/test/java/org/jenkinsci/plugins/p4/SampleServerRule.java | |||||
#1 | 20980 | Paul Allen |
Functional test upgrade. Switched to RSH pipe for Perforce connection and upgraded to 15.1 P4D binaries. Made use of ClassRule for Jenkins (faster startup) and a Rule for Perforce with separate roots (to allow for parallel test runs). |