Preliminary main mbed library for nexpaq development

Committer:
nexpaq
Date:
Fri Nov 04 20:27:58 2016 +0000
Revision:
0:6c56fb4bc5f0
Moving to library for sharing updates

Who changed what in which revision?

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