Repository: ant
Updated Branches:
  refs/heads/1.9.x fa27518dc -> 9a9647c8b


handle error that occur in testsuites directly in junitreport

https://bz.apache.org/bugzilla/show_bug.cgi?id=62443


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/9a9647c8
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/9a9647c8
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/9a9647c8

Branch: refs/heads/1.9.x
Commit: 9a9647c8be044ae55c6d30975e5018a7dba39204
Parents: fa27518
Author: Stefan Bodewig <bode...@apache.org>
Authored: Sat Jun 16 20:17:38 2018 +0200
Committer: Stefan Bodewig <bode...@apache.org>
Committed: Sat Jun 16 20:17:38 2018 +0200

----------------------------------------------------------------------
 WHATSNEW                 |  4 ++++
 src/etc/junit-frames.xsl | 16 ++++++++++++++++
 2 files changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/9a9647c8/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 699ad23..382fac2 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -32,6 +32,10 @@ Fixed bugs:
    end of the inout stream (usually System.in or System.console) are
    reached before a valid input has been read.
 
+ * junitreport does not list testsuites that fail to start any tests
+   because of an exception inside the all-tests and alltests-errors frames.
+   Bugzilla Report 62443
+
 Other changes:
 --------------
 

http://git-wip-us.apache.org/repos/asf/ant/blob/9a9647c8/src/etc/junit-frames.xsl
----------------------------------------------------------------------
diff --git a/src/etc/junit-frames.xsl b/src/etc/junit-frames.xsl
index 624fd69..49fc667 100644
--- a/src/etc/junit-frames.xsl
+++ b/src/etc/junit-frames.xsl
@@ -296,6 +296,7 @@ h6 {
                   </xsl:apply-templates>
                 </xsl:when>
                 <xsl:when test="$type = 'errors'">
+                  <xsl:apply-templates select=".//testsuite[error]" 
mode="alltests.error.row"/>
                   <xsl:apply-templates select=".//testcase[error]" 
mode="print.test">
                     <xsl:with-param name="show.class" select="'yes'"/>
                   </xsl:apply-templates>
@@ -306,6 +307,7 @@ h6 {
                   </xsl:apply-templates>
                 </xsl:when>
                 <xsl:otherwise>
+                  <xsl:apply-templates select=".//testsuite[error]" 
mode="alltests.error.row"/>
                   <xsl:apply-templates select=".//testcase" mode="print.test">
                     <xsl:with-param name="show.class" select="'yes'"/>
                   </xsl:apply-templates>
@@ -969,4 +971,18 @@ h6 {
     <xsl:param name="value"/>
     <xsl:value-of select="format-number($value,'0.00%')"/>
 </xsl:template>
+
+<xsl:template match="testsuite" mode="alltests.error.row">
+  <xsl:variable name="package.dir">
+    <xsl:if test="not(@package = '')"><xsl:value-of 
select="translate(@package,'.','/')"/><xsl:text>/</xsl:text></xsl:if>
+  </xsl:variable>
+  <xsl:variable name="class.href">
+    <xsl:value-of select="concat($package.dir, @id, '_', @name, '.html')"/>
+  </xsl:variable>
+  <tr class="Error">
+    <td><a href="{$class.href}"><xsl:value-of select="@name"/></a></td>
+    <td colspan="3"><xsl:apply-templates select="./error"/></td>
+  </tr>
+</xsl:template>
+
 </xsl:stylesheet>

Reply via email to