added variables to set timeout for compile and running time
[libfirm] / ir / be / test / makehtml.xslt
1 <?xml version="1.0"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3         <xsl:output method="html" indent="yes"
4               doctype-public="-//W3C//DTD HTML 4.01//EN"
5                     doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
6
7         <xsl:template name="resultcell" match="result/*">
8                 <xsl:element name="div">
9                         <xsl:if test="contains(text(), 'ok')">
10                                 <xsl:attribute name="style">background-color: green; color: white;</xsl:attribute>
11                         </xsl:if>
12                         <xsl:if test="contains(text(), 'failed')">
13                                 <xsl:attribute name="style">background-color: red; color: white;</xsl:attribute>
14                         </xsl:if>
15                         <xsl:value-of select="text()"/>
16                 </xsl:element>
17         </xsl:template>
18
19         <xsl:template match="/">
20                 <html>
21                         <head>
22                                 <title>Results</title>
23                         </head>
24                         <body>
25                                 <table>
26                                         <tr>
27                                                 <th>Name</th>
28                                                 <th>Compile</th>
29                                                 <th>Link</th>
30                                                 <th>GCC Compile</th>
31                                                 <th>GCC Run</th>
32                                                 <th>Firm Run</th>
33                                                 <th>Results</th>
34                                         </tr>
35                                         <xsl:for-each select="/results/section">
36                                                 <tr>
37                                                     <th colspan="7" style="background-color: yellow; color: black;"><xsl:value-of select="@name"/></th>
38                                                 </tr>
39                                                 <xsl:for-each select="result">
40                                                         <tr>
41                                                                 <td>
42                                                                         <xsl:element name="a">
43                                                                                 <xsl:attribute name="href">buildresult_<xsl:value-of select="@name"/>.txt</xsl:attribute>
44                                                                                 <xsl:value-of select="@name"/>
45                                                                         </xsl:element>
46                                                                 </td>
47                                                                 <td><xsl:apply-templates select="compile"/></td>
48                                                                 <td><xsl:apply-templates select="link"/></td>
49                                                                 <td><xsl:apply-templates select="gcc_compile"/></td>
50                                                                 <td><xsl:apply-templates select="gcc_run"/></td>
51                                                                 <td><xsl:apply-templates select="firm_run"/></td>
52                                                                 <td><xsl:apply-templates select="diff"/></td>
53                                                         </tr>
54                                                 </xsl:for-each>
55                                         </xsl:for-each>
56                                 </table>
57                         </body>
58                 </html>
59         </xsl:template>
60 </xsl:stylesheet>