1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 18:55:38 +02:00

Added summary table.

This commit is contained in:
Doug Schaefer 2004-01-13 03:23:00 +00:00
parent 2987f58e21
commit cfa54903d5

View file

@ -7,7 +7,32 @@
<head><title>Test Results for <xsl:value-of select="@name"/></title></head>
<body>
<h2>Summary Table for <xsl:value-of select="@name"/></h2>
<p>Some day...</p>
<xsl:variable name="pass" select="count(//test[@result='pass'])"/>
<xsl:variable name="failed" select="count(//test[@result='failed'])"/>
<xsl:variable name="error" select="count(//test[@result='error'])"/>
<xsl:variable name="total" select="count(//test)"/>
<xsl:variable name="time" select="sum(//test/@time)"/>
<xsl:variable name="mins" select="floor($time div 60)"/>
<xsl:variable name="secs" select="floor($time - $mins * 60)"/>
<xsl:variable name="fsecs" select="$time - $mins * 60 - $secs"/>
<table border="2" cellspacing="0" cellpadding="2">
<tr>
<th>Total</th>
<th>Pass</th>
<th>Fail</th>
<th>Error</th>
<th>Pass Rate</th>
<th>Time</th>
</tr>
<tr>
<td><xsl:value-of select="$total"/></td>
<td><xsl:value-of select="$pass"/></td>
<td><xsl:value-of select="$failed"/></td>
<td><xsl:value-of select="$error"/></td>
<td><xsl:value-of select="format-number($pass div $total, '#.0%')"/></td>
<td><xsl:value-of select="$mins"/>:<xsl:value-of select="format-number($secs, '00')"/><xsl:value-of select="format-number($fsecs, '.0')"/></td>
</tr>
</table>
<xsl:apply-templates/>
</body>
</html>
@ -15,7 +40,7 @@
<xsl:template match="testSuite">
<h2>Test Suite: <xsl:value-of select="@name"/></h2>
<table border="2" cellspacing="0" width="100%">
<table border="2" cellspacing="0" cellpadding="2" width="100%">
<tr><th>Result</th><th>Time (s)</th><th>Test</th></tr>
<xsl:apply-templates/>
</table>
@ -24,7 +49,7 @@
<xsl:template match="test">
<tr>
<td><xsl:value-of select="@result"/></td>
<td><xsl:value-of select="@time"/></td>
<td><xsl:value-of select="format-number(@time, '0.000')"/></td>
<td>
<xsl:value-of select="../@name"/><br></br>::<xsl:value-of select="@name"/>
</td>