Skip to content
Permalink
Browse files

Merge pull request #4 from bobtheshrew/patch-1

Fix for JENKINS-17438
  • Loading branch information...
gboissinot committed Apr 8, 2013
2 parents 9bfb261 + f4ef46d commit 6f0d4a8a6445ac66a07325acc3e778f895e4b576
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/org/jenkinsci/plugins/xunit/XUnitPublisher.java
@@ -166,7 +166,7 @@ private boolean performTests(XUnitLog xUnitLog, AbstractBuild<?, ?> build, Build
xUnitLog.infoConsoleLogger("Processing " + tool.getDescriptor().getDisplayName());
if (!isEmptyGivenPattern(xUnitReportService, tool)) {
String expandedPattern = getExpandedResolvedPattern(tool, build, listener);
XUnitToolInfo xUnitToolInfo = getXUnitToolInfoObject(tool, expandedPattern, build);
XUnitToolInfo xUnitToolInfo = getXUnitToolInfoObject(tool, expandedPattern, build, listener);
XUnitTransformer xUnitTransformer = getXUnitTransformerObject(xUnitToolInfo, listener);
boolean resultTransformation = getWorkspace(build).act(xUnitTransformer);
if (!resultTransformation) {
@@ -187,15 +187,15 @@ private String getExpandedResolvedPattern(TestType tool, AbstractBuild build, Bu
return Util.replaceMacro(newExpandedPattern, build.getEnvironment(listener));
}

private XUnitToolInfo getXUnitToolInfoObject(TestType tool, String expandedPattern, AbstractBuild build) {
private XUnitToolInfo getXUnitToolInfoObject(TestType tool, String expandedPattern, AbstractBuild build, BuildListener listener) throws IOException, InterruptedException {
return new XUnitToolInfo(
new FilePath(new File(Hudson.getInstance().getRootDir(), "userContent")),
tool.getInputMetric(),
expandedPattern,
tool.isFailIfNotNew(),
tool.isDeleteOutputFiles(), tool.isStopProcessingIfError(),
build.getTimeInMillis(),
(tool instanceof CustomType) ? getWorkspace(build).child(((CustomType) tool).getCustomXSL()) : null);
(tool instanceof CustomType) ? getWorkspace(build).child( Util.replaceMacro( ((CustomType) tool).getCustomXSL() , build.getEnvironment(listener)) ) : null);
}

private FilePath getWorkspace(AbstractBuild build) {

0 comments on commit 6f0d4a8

Please sign in to comment.
You can’t perform that action at this time.