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