--- a/tests/check.xsl Sun Feb 10 08:47:12 2008 -0600
+++ b/tests/check.xsl Sun Feb 10 09:46:11 2008 -0600
@@ -4,9 +4,12 @@
xmlns:check="http://check.sourceforge.net/ns"
+ <!-- default parameters --> <xsl:param name="project"/>
+ <xsl:param name="version"/> + <!-- output options --> @@ -14,6 +17,12 @@
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+ <!-- number of tests, number of passes, passed percentage --> + <xsl:variable name="tests" select="count(/check:testsuites/check:suite/check:test)"/> + <xsl:variable name="passes" select="count(/check:testsuites/check:suite/check:test[@result='success'])"/> + <xsl:variable name="percent" select="($passes div $tests)"/> <xsl:variable name="script">
@@ -48,6 +57,7 @@
<xsl:variable name="css">
@@ -60,6 +70,7 @@
<xsl:variable name="title">
<xsl:when test="$project">
@@ -72,6 +83,31 @@
<xsl:text> - Check Results</xsl:text>
+ <xsl:variable name="architect"> + <xsl:when test="$arch"> + <xsl:value-of select="$arch"/> + <xsl:text>Unknown</xsl:text> + <xsl:variable name="project_version"> + <xsl:when test="$version"> + <xsl:value-of select="$version"/> + <xsl:text>Unknown</xsl:text> + <!-- meat and ... here, where the fuck are my potatoes!?!?! --> <xsl:template match="check:testsuites">
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -90,11 +126,11 @@
<td><strong><xsl:text>Version:</xsl:text></strong></td>
- <td><xsl:value-of select="$version"/></td>
+ <td><xsl:copy-of select="$project_version"/></td> <td><strong><xsl:text>Architect:</xsl:text></strong></td>
- <td><xsl:value-of select="$arch"/></td>
+ <td><xsl:copy-of select="$architect"/></td> <td><strong><xsl:text>Ran on:</xsl:text></strong></td>
@@ -102,7 +138,18 @@
<td><strong><xsl:text>Duration:</xsl:text></strong></td>
- <td><xsl:value-of select="check:duration"/><xsl:text> seconds</xsl:text></td>
+ <td><xsl:value-of select="format-number(check:duration, '###.##')"/><xsl:text> seconds</xsl:text></td> + <td><strong>Results:</strong></td> + <xsl:copy-of select="$passes"/> + <xsl:text> of </xsl:text> + <xsl:copy-of select="$tests"/> + <xsl:text> (</xsl:text> + <xsl:value-of select="format-number($percent, '###.##%')"/> + <xsl:text>) tests passed</xsl:text>