use of com.google.devtools.build.lib.packages.PackageFactory.PackageContext in project bazel by bazelbuild.
the class SkylarkTestCase method createEvaluationTestCase.
protected EvaluationTestCase createEvaluationTestCase() {
return new EvaluationTestCase() {
@Override
public Environment newEnvironment() throws Exception {
Environment env = Environment.builder(mutability).setEventHandler(getEventHandler()).setGlobals(SkylarkModules.getGlobals(SkylarkModules.MODULES)).setPhase(Phase.LOADING).build().setupDynamic(PackageFactory.PKG_CONTEXT, // create rules. Creating actual rules is tested in SkylarkIntegrationTest.
new PackageContext(null, null, getEventHandler(), null));
SkylarkUtils.setToolsRepository(env, TestConstants.TOOLS_REPOSITORY);
return env;
}
};
}
Aggregations