Skip to content
Browse files

Fix for JENKINS-17438

Updated getXUnitToolInfoObject() to include:
 * BuildListener parameter
 * Use Util.replaceMacro() to expand CustomXSL string

Updated performTests() call to getXUnitToolInfoObject() to include BuildListener parameter
 * Searched rest of the code, this seems to be the only call of getXUnitToolInfoObject()

Addresses Bug:
  • Loading branch information
bobtheshrew committed Apr 5, 2013
1 parent 9bfb261 commit a7352df6dfb5b7e418fc2ea258c0ef1e6b67f689
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/java/org/jenkinsci/plugins/xunit/
@@ -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) {
return new XUnitToolInfo(
new FilePath(new File(Hudson.getInstance().getRootDir(), "userContent")),
tool.isDeleteOutputFiles(), tool.isStopProcessingIfError(),
(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 a7352df

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