use of org.gradle.integtests.fixtures.executer.IntegrationTestBuildContext in project gradle by gradle.
the class Sample method apply.
public Statement apply(final Statement base, FrameworkMethod method, Object target) {
sampleName = getSampleName(method);
return new Statement() {
@Override
public void evaluate() throws Throwable {
if (sampleName != null) {
String hintForMissingSample = String.format("If '%s' is a new sample, try running 'gradle intTestImage'.", sampleName);
TestFile srcDir = new IntegrationTestBuildContext().getSamplesDir().file(sampleName).assertIsDir(hintForMissingSample);
logger.debug("Copying sample '{}' to test directory.", sampleName);
srcDir.copyTo(getDir());
} else {
logger.debug("No sample specified for this test, skipping.");
}
base.evaluate();
}
};
}
Aggregations