1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 drawElements Quality Program utilities 4 5 Copyright 2016 The Android Open Source Project 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18--> 19<xsl:stylesheet 20 version="1.0" 21 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 22 xmlns="http://www.w3.org/1999/xhtml"> 23 24 <xsl:output method="xml" indent="yes" encoding="UTF-8"/> 25 26 <xsl:template match="/"> 27 <xsl:apply-templates/> 28 </xsl:template> 29 30 <xsl:template match="BatchResult"> 31 <html> 32 <head> 33 <link href="testlog.css" rel="stylesheet" type="text/css"/> 34 <title><xsl:value-of select="@FileName"/></title> 35 </head> 36 <body> 37 <table class="Totals"> 38 <tr><td><b><xsl:text>Total cases</xsl:text></b></td><td><b><xsl:value-of select="ResultTotals/@All"/></b></td></tr> 39 <tr><td><xsl:text>Pass</xsl:text></td><td class="Pass"><xsl:value-of select="ResultTotals/@Pass"/></td></tr> 40 <tr><td><xsl:text>Fail</xsl:text></td><td class="Fail"><xsl:value-of select="ResultTotals/@Fail"/></td></tr> 41 <tr><td><xsl:text>Quality warning</xsl:text></td><td class="QualityWarning"><xsl:value-of select="ResultTotals/@QualityWarning"/></td></tr> 42 <tr><td><xsl:text>Compatibility warning</xsl:text></td><td class="CompatibilityWarning"><xsl:value-of select="ResultTotals/@CompatibilityWarning"/></td></tr> 43 <!-- <tr><td><xsl:text>Pending</xsl:text></td><td class="Pending"><xsl:value-of select="ResultTotals/@pending"/></td></tr> --> 44 <!-- <tr><td><xsl:text>Running</xsl:text></td><td class="Running"><xsl:value-of select="ResultTotals/@Running"/></td></tr> --> 45 <tr><td><xsl:text>Not supported</xsl:text></td><td class="NotSupported"><xsl:value-of select="ResultTotals/@NotSupported"/></td></tr> 46 <tr><td><xsl:text>Resource error</xsl:text></td><td class="ResourceError"><xsl:value-of select="ResultTotals/@ResourceError"/></td></tr> 47 <tr><td><xsl:text>Internal error</xsl:text></td><td class="InternalError"><xsl:value-of select="ResultTotals/@InternalError"/></td></tr> 48 <!-- <tr><td><xsl:text>Canceled</xsl:text></td><td class="Canceled"><xsl:value-of select="ResultTotals/@Canceled"/></td></tr> --> 49 <tr><td><xsl:text>Timeout</xsl:text></td><td class="Timeout"><xsl:value-of select="ResultTotals/@Timeout"/></td></tr> 50 <tr><td><xsl:text>Crash</xsl:text></td><td class="Crash"><xsl:value-of select="ResultTotals/@Crash"/></td></tr> 51 <tr><td><xsl:text>Disabled</xsl:text></td><td class="Disabled"><xsl:value-of select="ResultTotals/@Disabled"/></td></tr> 52 <!-- <tr><td><xsl:text>Terminated</xsl:text></td><td class="Terminated"><xsl:value-of select="ResultTotals/@Terminated"/></td></tr> --> 53 </table> 54 <xsl:apply-templates/> 55 </body> 56 </html> 57 </xsl:template> 58 59 <xsl:template match="/TestCaseResult"> 60 <html> 61 <head> 62 <link href="testlog.css" rel="stylesheet" type="text/css"/> 63 <title><xsl:value-of select="@CasePath"/></title> 64 </head> 65 <body> 66 <h1 class="{Result/@StatusCode}"><xsl:value-of select="@CasePath"/><xsl:text>: </xsl:text><xsl:value-of select="Result"/><xsl:text> (</xsl:text><xsl:value-of select="Result/@StatusCode"/><xsl:text>)</xsl:text></h1> 67 <xsl:apply-templates/> 68 </body> 69 </html> 70 </xsl:template> 71 72 <xsl:template match="BatchResult/TestCaseResult"> 73 <div class="TestCaseResult"> 74 <h1 class="{Result/@StatusCode}"><xsl:value-of select="@CasePath"/><xsl:text>: </xsl:text><xsl:value-of select="Result"/><xsl:text> (</xsl:text><xsl:value-of select="Result/@StatusCode"/><xsl:text>)</xsl:text></h1> 75 <xsl:apply-templates/> 76 </div> 77 </xsl:template> 78 79 <xsl:template match="Section"> 80 <div class="Section"> 81 <h2><xsl:value-of select="@Description"/></h2> 82 <xsl:apply-templates/> 83 </div> 84 </xsl:template> 85 86 <xsl:template match="ImageSet"> 87 <div class="ImageSet"> 88 <h3><xsl:value-of select="@Description"/></h3> 89 <xsl:apply-templates/> 90 </div> 91 </xsl:template> 92 93 <xsl:template match="Image"> 94 <div class="Image"> 95 <xsl:value-of select="@Description"/><br/> 96 <img src="data:image/png;base64,{.}"/> 97 </div> 98 </xsl:template> 99 100 <xsl:template match="CompileInfo"> 101 <div class="CompileInfo"> 102 <h3 class="{@CompileStatus}"><xsl:value-of select="@Description"/></h3> 103 <xsl:apply-templates/> 104 </div> 105 </xsl:template> 106 107 <xsl:template match="ShaderProgram"> 108 <div class="CompileInfo"> 109 <h3 class="{@LinkStatus}"><xsl:text>Shader Program</xsl:text></h3> 110 <xsl:apply-templates/> 111 </div> 112 </xsl:template> 113 114 <xsl:template match="VertexShader"> 115 <div class="Shader"> 116 <h3 class="{@CompileStatus}"><xsl:text>Vertex Shader</xsl:text></h3> 117 <xsl:apply-templates/> 118 </div> 119 </xsl:template> 120 121 <xsl:template match="FragmentShader"> 122 <div class="Shader"> 123 <h3 class="{@CompileStatus}"><xsl:text>Fragment Shader</xsl:text></h3> 124 <xsl:apply-templates/> 125 </div> 126 </xsl:template> 127 128 <xsl:template match="Number"> 129 <xsl:value-of select="@Description"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="@Unit"/><br/> 130 </xsl:template> 131 132 <xsl:template match="Result"> 133 </xsl:template> 134 135 <xsl:template match="Text"> 136 <xsl:value-of select="."/><br/> 137 </xsl:template> 138 139 <xsl:template match="KernelSource"> 140 <pre class="KernelSource"><xsl:value-of select="."/></pre> 141 </xsl:template> 142 143 <xsl:template match="ShaderSource"> 144 <pre class="ShaderSource"><xsl:value-of select="."/></pre> 145 </xsl:template> 146 147 <xsl:template match="InfoLog"> 148 <pre class="InfoLog"><xsl:value-of select="."/></pre> 149 </xsl:template> 150 151 <xsl:template match="EglConfigSet"> 152 <div class="Section"> 153 <h2><xsl:value-of select="@Description"/></h2> 154 <table class="EglConfigList"> 155 <tr> 156 <td class="ConfigListTitle"><xsl:text>ID</xsl:text></td> 157 <td class="ConfigListTitle"><xsl:text>R</xsl:text></td> 158 <td class="ConfigListTitle"><xsl:text>G</xsl:text></td> 159 <td class="ConfigListTitle"><xsl:text>B</xsl:text></td> 160 <td class="ConfigListTitle"><xsl:text>A</xsl:text></td> 161 <td class="ConfigListTitle"><xsl:text>D</xsl:text></td> 162 <td class="ConfigListTitle"><xsl:text>S</xsl:text></td> 163 <td class="ConfigListTitle"><xsl:text>mS</xsl:text></td> 164 </tr> 165 <xsl:apply-templates/> 166 </table> 167 </div> 168 </xsl:template> 169 170 <xsl:template match="EglConfig"> 171 <tr> 172 <td class="ConfigListValue"><xsl:value-of select="@ConfigID"/></td> 173 <td class="ConfigListValue"><xsl:value-of select="@RedSize"/></td> 174 <td class="ConfigListValue"><xsl:value-of select="@GreenSize"/></td> 175 <td class="ConfigListValue"><xsl:value-of select="@BlueSize"/></td> 176 <td class="ConfigListValue"><xsl:value-of select="@AlphaSize"/></td> 177 <td class="ConfigListValue"><xsl:value-of select="@DepthSize"/></td> 178 <td class="ConfigListValue"><xsl:value-of select="@StencilSize"/></td> 179 <td class="ConfigListValue"><xsl:value-of select="@Samples"/></td> 180 </tr> 181 </xsl:template> 182 183</xsl:stylesheet> 184