File: .travis.xsl

package info (click to toggle)
oce 0.18.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 301,460 kB
  • sloc: cpp: 1,190,610; ansic: 67,225; sh: 11,667; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 344; xml: 292; perl: 37
file content (41 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (4)
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
41
<?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>