forked from tpaviot/oce
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.xsl
41 lines (35 loc) · 1.35 KB
/
.travis.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output method="text"/>
<xsl:param name="duration"/>
<xsl:template match="testsuite">
<xsl:choose>
<xsl:when test="$duration = 1">
<xsl:value-of select="@name"/>
<xsl:text> (</xsl:text>
<xsl:value-of select="@tests"/>
<xsl:text> tests, </xsl:text>
<xsl:value-of select="@skipped"/>
<xsl:text> skipped, </xsl:text>
<xsl:value-of select="@failures"/>
<xsl:text> failures, </xsl:text>
<xsl:value-of select="@errors"/>
<xsl:text> errors) </xsl:text>
<xsl:value-of select="format-number(@time, '###.##s')"/><xsl:text>
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="testcase"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="testcase">
<xsl:if test="contains(@status, 'FAILED')">
<xsl:variable name="parent" select="../@name"/>
<xsl:value-of select="translate($parent, ' ', '/')"/>/<xsl:value-of select="@name"/>
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>