This is an automated email from the ASF dual-hosted git repository.
jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 23a3665 bz-63827 Print out the stacktrace when writing out the XML
from "legacy-xml" formatter of junitlauncher
23a3665 is described below
commit 23a3665c3ee78c6b7eea8888ddee4cde72f72270
Author: Jaikiran Pai <[email protected]>
AuthorDate: Thu Oct 10 13:53:00 2019 +0530
bz-63827 Print out the stacktrace when writing out the XML from
"legacy-xml" formatter of junitlauncher
---
WHATSNEW | 7 +++++++
.../taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java | 3 +++
2 files changed, 10 insertions(+)
diff --git a/WHATSNEW b/WHATSNEW
index a26a9f3..ab9d210 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -1,6 +1,13 @@
Changes from Ant 1.10.7 TO Ant 1.10.8
=====================================
+Fixed bugs:
+-----------
+
+ * "legacy-xml" formatter of junitlauncher task wasn't writing out
+ the stacktrace for failures. This is now fixed.
+ Bugzilla Report 63827
+
Other changes:
--------------
diff --git
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
index 91caca6..6ea6e7b 100644
---
a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
+++
b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java
@@ -19,6 +19,7 @@ package org.apache.tools.ant.taskdefs.optional.junitlauncher;
import org.apache.tools.ant.util.DOMElementWriter;
import org.apache.tools.ant.util.DateUtils;
+import org.apache.tools.ant.util.StringUtils;
import org.junit.platform.engine.TestExecutionResult;
import org.junit.platform.engine.TestSource;
import org.junit.platform.engine.reporting.ReportEntry;
@@ -282,6 +283,8 @@ class LegacyXmlResultFormatter extends
AbstractJUnitResultFormatter implements T
writer.writeAttribute(ATTR_MESSAGE, message);
}
writer.writeAttribute(ATTR_TYPE, t.getClass().getName());
+ // write out the stacktrace
+ writer.writeCData(StringUtils.getStackTrace(cause.get()));
}
writer.writeEndElement();
}