summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-12-09 20:01:03 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-12-09 20:01:03 +0100
commit84e25eb07749636b48deb802d673f44841c55d91 (patch)
tree4a16f53a06e7f6d50843fff7053dcf8d4e2c8fd6
parent9e8b57d6e6c5cee76af12bce27efb81041676314 (diff)
download6502-84e25eb07749636b48deb802d673f44841c55d91.tar.gz
6502-84e25eb07749636b48deb802d673f44841c55d91.tar.bz2
some more work on test result generation
-rw-r--r--emu/tests/check_unittest.xslt93
1 files changed, 93 insertions, 0 deletions
diff --git a/emu/tests/check_unittest.xslt b/emu/tests/check_unittest.xslt
new file mode 100644
index 0000000..b8005fe
--- /dev/null
+++ b/emu/tests/check_unittest.xslt
@@ -0,0 +1,93 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+xmlns:c="http://check.sourceforge.net/ns">
+
+<!--
+
+bart@vankuik.nl, 13-MAR-2006
+
+You can use this xslt on the commandline as follows:
+$ xsltproc check_unittest.xslt check_output.xml > check_output.html
+
+-->
+
+<xsl:output method="html"/>
+
+<xsl:template match="c:testsuites">
+ <html><title>Test results</title><body>
+ <p>
+ <table width="100%" border="1" cellpadding="0">
+ <tr><td colspan="7" style='background:#e5E5f5'><h1>Unittests</h1></td></tr>
+ <xsl:apply-templates/>
+ </table></p>
+ </body></html>
+</xsl:template>
+
+<xsl:template match="c:suite">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="c:title">
+ <tr>
+ <th colspan="7">Test suite <xsl:apply-templates/></th>
+ </tr>
+ <tr>
+ <td>Path</td>
+ <td>Filename</td>
+ <td>Test ID</td>
+ <td>Iteration</td>
+ <td>Duration</td>
+ <td>Description</td>
+ <td>Message</td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="c:datetime">
+ <tr><th colspan="7">Test ran at: <xsl:apply-templates/></th></tr>
+</xsl:template>
+
+<xsl:template match="c:test[@result='success']">
+ <tr bgcolor="green"><xsl:apply-templates/></tr>
+</xsl:template>
+
+<xsl:template match="c:test[@result='error']">
+ <tr bgcolor="red"><xsl:apply-templates/></tr>
+</xsl:template>
+
+<xsl:template match="c:test[@result='failure']">
+ <tr bgcolor="red"><xsl:apply-templates/></tr>
+</xsl:template>
+
+<xsl:template match="c:path">
+ <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:fn">
+ <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:id">
+ <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:iteration">
+ <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:description">
+ <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:message">
+ <td><pre><tt><xsl:apply-templates/></tt></pre></td>
+</xsl:template>
+
+<xsl:template match="c:test/c:duration">
+ <td><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="c:duration">
+ <tr><th colspan="7">Test duration: <xsl:apply-templates/> seconds</th></tr>
+</xsl:template>
+
+</xsl:stylesheet>
+