use of hudson.remoting.VirtualChannel in project evosuite by EvoSuite.
the class ProjectAction method perform.
public void perform(AbstractMavenProject<?, ?> project, AbstractBuild<?, ?> build, BuildListener listener) throws InterruptedException, IOException {
EnvVars env = build.getEnvironment(listener);
env.overrideAll(build.getBuildVariables());
VirtualChannel channel = build.getWorkspace().getChannel();
MavenModuleSet prj = (MavenModuleSet) this.project;
for (MavenModule module : prj.getModules()) {
FilePath fp = new FilePath(channel, build.getWorkspace().getRemote() + File.separator + (module.getRelativePath().isEmpty() ? "" : module.getRelativePath() + File.separator) + Properties.CTG_DIR + File.separator + Properties.CTG_PROJECT_INFO);
if (!fp.exists()) {
listener.getLogger().println(EvoSuiteRecorder.LOG_PREFIX + "There is not any " + fp.getRemote() + " file for module " + module.getName());
continue;
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
fp.copyTo(out);
ByteArrayInputStream projectXML = new ByteArrayInputStream(out.toByteArray());
listener.getLogger().println(EvoSuiteRecorder.LOG_PREFIX + "Analysing " + Properties.CTG_PROJECT_INFO + " file from " + fp.getRemote());
ModuleAction m = new ModuleAction(build, module.getName());
if (!m.build(channel, projectXML, listener)) {
continue;
}
this.modules.add(m);
}
}
Aggregations