[evolution-data-server/wip/gtester] Update junit xslt process to store messages
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/gtester] Update junit xslt process to store messages
- Date: Mon, 11 Mar 2013 13:33:32 +0000 (UTC)
commit e32eb0d0e872f9febf6f41f1549e5a1a0cb9e8f2
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Mon Mar 11 14:33:22 2013 +0100
Update junit xslt process to store messages
gtester2junit.xsl | 119 +++++++++++++++++++++++++++--------------------------
1 files changed, 61 insertions(+), 58 deletions(-)
---
diff --git a/gtester2junit.xsl b/gtester2junit.xsl
index 70d0f9e..a23b5fb 100644
--- a/gtester2junit.xsl
+++ b/gtester2junit.xsl
@@ -5,67 +5,70 @@
<!-- Based on this code:
http://geekswithblogs.net/Erik/archive/2008/04/01/120915.aspx
-->
-<xsl:template name="strreplace">
-<xsl:param name="string"/>
-<xsl:param name="token"/>
-<xsl:param name="newtoken"/>
-<xsl:choose>
-<xsl:when test="contains($string, $token)">
-<xsl:value-of select="substring-before($string, $token)"/>
-<xsl:value-of select="$newtoken"/>
-<xsl:call-template name="strreplace">
-<xsl:with-param name="string" select="substring-after($string, $token)"/>
-<xsl:with-param name="token" select="$token"/>
-<xsl:with-param name="newtoken" select="$newtoken"/>
-</xsl:call-template>
-</xsl:when>
-<xsl:otherwise>
-<xsl:value-of select="$string"/>
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
+ <xsl:template name="strreplace">
+ <xsl:param name="string"/>
+ <xsl:param name="token"/>
+ <xsl:param name="newtoken"/>
+ <xsl:choose>
+ <xsl:when test="contains($string, $token)">
+ <xsl:value-of select="substring-before($string, $token)"/>
+ <xsl:value-of select="$newtoken"/>
+ <xsl:call-template name="strreplace">
+ <xsl:with-param name="string" select="substring-after($string, $token)"/>
+ <xsl:with-param name="token" select="$token"/>
+ <xsl:with-param name="newtoken" select="$newtoken"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
<xsl:template match="/report-collection">
<testsuites>
-<xsl:for-each select="gtester/testbinary">
-<testsuite>
-<xsl:attribute name="name">
-<xsl:value-of select="@path"/>
-</xsl:attribute>
-<xsl:attribute name="tests">
-<xsl:value-of select="count(testcase)"/>
-</xsl:attribute>
-<xsl:attribute name="time">
-<xsl:value-of select="sum(testcase/duration)"/>
-</xsl:attribute>
-<xsl:attribute name="failures">
-<xsl:value-of select="count(testcase/status[ result='failed'])"/>
-</xsl:attribute>
-<xsl:for-each select="testcase">
-<testcase>
-<xsl:variable name="classname">
-<xsl:call-template name="strreplace">
-<xsl:with-param name="string" select="substring-after(@path, '/')"/>
-<xsl:with-param name="token" select="'/'"/>
-<xsl:with-param name="newtoken" select="'.'"/>
-</xsl:call-template>
-</xsl:variable>
-<xsl:attribute name="classname">
-<xsl:value-of select="$classname"/>
-</xsl:attribute>
-<xsl:attribute name="name">g_test</xsl:attribute>
-<xsl:attribute name="time">
-<xsl:value-of select="duration"/>
-</xsl:attribute>
-<xsl:if test="status[ result = 'failed']">
-<failure>
-<xsl:value-of select="error"/>
-</failure>
-</xsl:if>
-</testcase>
-</xsl:for-each>
-</testsuite>
-</xsl:for-each>
+ <xsl:for-each select="gtester/testbinary">
+ <testsuite>
+ <xsl:attribute name="name">
+ <xsl:value-of select="@path"/>
+ </xsl:attribute>
+ <xsl:attribute name="tests">
+ <xsl:value-of select="count(testcase)"/>
+ </xsl:attribute>
+ <xsl:attribute name="time">
+ <xsl:value-of select="sum(testcase/duration)"/>
+ </xsl:attribute>
+ <xsl:attribute name="failures">
+ <xsl:value-of select="count(testcase/status[ result='failed'])"/>
+ </xsl:attribute>
+ <xsl:for-each select="testcase">
+ <testcase>
+ <xsl:variable name="classname">
+ <xsl:call-template name="strreplace">
+ <xsl:with-param name="string" select="substring-after(@path, '/')"/>
+ <xsl:with-param name="token" select="'/'"/>
+ <xsl:with-param name="newtoken" select="'.'"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:attribute name="classname">
+ <xsl:value-of select="$classname"/>
+ </xsl:attribute>
+ <xsl:attribute name="name">g_test</xsl:attribute>
+ <xsl:attribute name="time">
+ <xsl:value-of select="duration"/>
+ </xsl:attribute>
+ <xsl:if test="status[ result = 'failed']">
+ <failure>
+ <xsl:value-of select="error"/>
+ </failure>
+ </xsl:if>
+ <system-out>
+ <xsl:value-of select="message" separator=" "/>
+ </system-out>
+ </testcase>
+ </xsl:for-each>
+ </testsuite>
+ </xsl:for-each>
</testsuites>
</xsl:template>
</xsl:stylesheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]