A metronome using the FRDM K64F board

Committer:
ram54288
Date:
Sun May 14 18:40:18 2017 +0000
Revision:
0:a7a43371b306
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ram54288 0:a7a43371b306 1 <?xml version="1.0" encoding="UTF-8" ?>
ram54288 0:a7a43371b306 2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
ram54288 0:a7a43371b306 3
ram54288 0:a7a43371b306 4 <xsl:output encoding="UTF-8" indent="yes" method="html"/>
ram54288 0:a7a43371b306 5 <xsl:strip-space elements="*"/>
ram54288 0:a7a43371b306 6
ram54288 0:a7a43371b306 7 <xsl:variable name="list"
ram54288 0:a7a43371b306 8 select="document('index.xml')/list" />
ram54288 0:a7a43371b306 9
ram54288 0:a7a43371b306 10 <xsl:template match="/">
ram54288 0:a7a43371b306 11 <h1>
ram54288 0:a7a43371b306 12 Unittest report
ram54288 0:a7a43371b306 13 </h1>
ram54288 0:a7a43371b306 14
ram54288 0:a7a43371b306 15 <p>
ram54288 0:a7a43371b306 16 <b>
ram54288 0:a7a43371b306 17 Total tests run <xsl:value-of select="sum(document($list/entry/@name)/testsuite/@tests)"/>
ram54288 0:a7a43371b306 18 , failures: <xsl:value-of select="sum(document($list/entry/@name)/testsuite/@failures) + sum(document($list/entry/@name)/testsuite/@errors)"/>
ram54288 0:a7a43371b306 19 </b>
ram54288 0:a7a43371b306 20
ram54288 0:a7a43371b306 21 <xsl:for-each select="document($list/entry/@name)" >
ram54288 0:a7a43371b306 22 <xsl:apply-templates select="testsuite"/>
ram54288 0:a7a43371b306 23 </xsl:for-each>
ram54288 0:a7a43371b306 24 </p>
ram54288 0:a7a43371b306 25 </xsl:template>
ram54288 0:a7a43371b306 26
ram54288 0:a7a43371b306 27 <xsl:template match="testsuite">
ram54288 0:a7a43371b306 28 <h2>
ram54288 0:a7a43371b306 29 <xsl:value-of select="@name" />
ram54288 0:a7a43371b306 30 </h2>
ram54288 0:a7a43371b306 31 <table border="1" cellSpacing="0" cellPadding="10" >
ram54288 0:a7a43371b306 32 <tr>
ram54288 0:a7a43371b306 33 <th>Tests run</th>
ram54288 0:a7a43371b306 34 <th>Tests failed</th>
ram54288 0:a7a43371b306 35 <th>Other errors</th>
ram54288 0:a7a43371b306 36 </tr>
ram54288 0:a7a43371b306 37 <tr>
ram54288 0:a7a43371b306 38 <td><xsl:value-of select="@tests"/></td>
ram54288 0:a7a43371b306 39 <td><xsl:value-of select="@failures"/></td>
ram54288 0:a7a43371b306 40 <td><xsl:value-of select="@errors"/></td>
ram54288 0:a7a43371b306 41 </tr>
ram54288 0:a7a43371b306 42 </table>
ram54288 0:a7a43371b306 43 <br/>
ram54288 0:a7a43371b306 44 <table border="1" cellSpacing="0" cellPadding="10" >
ram54288 0:a7a43371b306 45 <tr>
ram54288 0:a7a43371b306 46 <th>Tests name</th>
ram54288 0:a7a43371b306 47 <th>PASS/FAIL</th>
ram54288 0:a7a43371b306 48 <th>Failing case</th>
ram54288 0:a7a43371b306 49 <th>Reason</th>
ram54288 0:a7a43371b306 50 </tr>
ram54288 0:a7a43371b306 51 <xsl:apply-templates select="testcase"/>
ram54288 0:a7a43371b306 52 </table>
ram54288 0:a7a43371b306 53 </xsl:template>
ram54288 0:a7a43371b306 54
ram54288 0:a7a43371b306 55 <xsl:template match="testcase">
ram54288 0:a7a43371b306 56 <xsl:choose>
ram54288 0:a7a43371b306 57 <xsl:when test="failure">
ram54288 0:a7a43371b306 58 <tr><td><font color="#FF0000"><xsl:value-of select="@name" /></font></td><xsl:apply-templates select="failure"/></tr>
ram54288 0:a7a43371b306 59 </xsl:when>
ram54288 0:a7a43371b306 60 <xsl:when test="error">
ram54288 0:a7a43371b306 61 <tr><td><font color="#FF0000"><xsl:value-of select="@name" /></font></td><xsl:apply-templates select="error"/></tr>
ram54288 0:a7a43371b306 62 </xsl:when>
ram54288 0:a7a43371b306 63 <xsl:otherwise>
ram54288 0:a7a43371b306 64 <tr><td><xsl:value-of select="@name" /></td><td><font color="#00FF00">PASS</font></td><td></td><td></td></tr>
ram54288 0:a7a43371b306 65 </xsl:otherwise>
ram54288 0:a7a43371b306 66 </xsl:choose>
ram54288 0:a7a43371b306 67 </xsl:template>
ram54288 0:a7a43371b306 68
ram54288 0:a7a43371b306 69 <xsl:template match="failure">
ram54288 0:a7a43371b306 70 <td>
ram54288 0:a7a43371b306 71 <b><font color="#FF0000">FAIL</font></b>
ram54288 0:a7a43371b306 72 </td>
ram54288 0:a7a43371b306 73 <td>
ram54288 0:a7a43371b306 74 <font color="#ff0000">
ram54288 0:a7a43371b306 75 <xsl:value-of select="@message" />
ram54288 0:a7a43371b306 76 </font>
ram54288 0:a7a43371b306 77 </td>
ram54288 0:a7a43371b306 78 <td>
ram54288 0:a7a43371b306 79 <font color="#ff0000">
ram54288 0:a7a43371b306 80 <xsl:value-of select="@type" />
ram54288 0:a7a43371b306 81 </font>
ram54288 0:a7a43371b306 82 </td>
ram54288 0:a7a43371b306 83 </xsl:template>
ram54288 0:a7a43371b306 84
ram54288 0:a7a43371b306 85 <xsl:template match="error">
ram54288 0:a7a43371b306 86 <td>
ram54288 0:a7a43371b306 87 <b><font color="#FF0000">FAIL</font></b>
ram54288 0:a7a43371b306 88 </td>
ram54288 0:a7a43371b306 89 <td>
ram54288 0:a7a43371b306 90 <font color="#ff0000">
ram54288 0:a7a43371b306 91 <xsl:value-of select="@message" />
ram54288 0:a7a43371b306 92 </font>
ram54288 0:a7a43371b306 93 </td>
ram54288 0:a7a43371b306 94 <td>
ram54288 0:a7a43371b306 95 <font color="#ff0000">
ram54288 0:a7a43371b306 96 <xsl:value-of select="@type" />
ram54288 0:a7a43371b306 97 </font>
ram54288 0:a7a43371b306 98 </td>
ram54288 0:a7a43371b306 99 </xsl:template>
ram54288 0:a7a43371b306 100
ram54288 0:a7a43371b306 101 </xsl:stylesheet>