mbed-os for GR-LYCHEE

Dependents:   mbed-os-example-blinky-gr-lychee GR-Boads_Camera_sample GR-Boards_Audio_Recoder GR-Boads_Camera_DisplayApp ... more

Committer:
dkato
Date:
Fri Feb 02 05:42:23 2018 +0000
Revision:
0:f782d9c66c49
mbed-os for GR-LYCHEE

Who changed what in which revision?

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