Conformance testing makefile command

This commit is contained in:
Dzmitry Malyshau 2018-04-01 21:45:52 -04:00
parent 973025673c
commit b9e72ee612
4 changed files with 315 additions and 1 deletions

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
/build/
/target/
conformance/*.xml
conformance/*.qpa
**/*.rs.bk
Cargo.lock

View file

@ -1,4 +1,5 @@
VULKAN_DIR=modules/vulkan-docs/src
CTS_DIR=../VK-GL-CTS
BINDING=target/vulkan.rs
NATIVE_DIR=target/native
TARGET=$(NATIVE_DIR)/test
@ -31,9 +32,10 @@ else
endif
endif
FULL_LIBRARY_PATH=$(CURDIR)/target/debug
LIBRARY=target/debug/libportability.$(LIB_EXTENSION)
.PHONY: all binding run
.PHONY: all binding run cts
all: $(TARGET)
@ -55,6 +57,12 @@ $(TARGET): $(LIBRARY) $(OBJECTS) Makefile
run: $(TARGET)
$(TARGET)
cts: $(TARGET)
-LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) $(CTS_DIR)/build/external/vulkancts/modules/vulkan/deqp-vk
python $(CTS_DIR)/scripts/log/log_to_xml.py TestResults.qpa conformance/last.xml
mv TestResults.qpa conformance/last.qpa
firefox conformance/last.xml
clean:
rm -f $(OBJECTS) $(TARGET) $(BINDING)
cargo clean

121
conformance/testlog.css Normal file
View file

@ -0,0 +1,121 @@
body
{
font-size: 10pt;
font-family: verdana;
}
h1
{
font-size: 16pt;
font-weight: normal;
width: 100%;
padding: 4pt 0pt 6pt 0pt;
margin: 0px 0px 10pt 0px;
}
h2
{
font-size: 14pt;
font-weight: normal;
background: #cccccc;
width: 100%;
padding: 2pt 0pt 4pt 0pt;
margin: 0pt 0pt 2pt 0pt;
}
h3
{
font-size: 12pt;
font-weight: normal;
width: 100%;
padding: 2pt 0pt 4pt 0pt;
margin: 0pt 0pt 0pt 0pt;
}
div.Section
{
border: 1px solid #aaaaaa;
margin: 2pt 2pt 4pt 10pt;
padding: 0pt;
}
div.CompileInfo
{
border: 1px solid #aaaaaa;
margin: 2pt 2pt 4pt 10pt;
padding: 0pt;
}
div.Shader
{
border: 1px solid #aaaaaa;
margin: 2pt 2pt 4pt 10pt;
padding: 0pt;
}
div.ImageSet
{
border: 1px solid #aaaaaa;
margin: 2pt 2pt 4pt 10pt;
padding: 0pt;
}
div.Image
{
border: none;
margin: 2pt;
text-align: center;
}
pre.InfoLog
{
background: #ddddee;
margin: 0px;
}
td.ConfigListTitle
{
font-weight: bold;
text-align: right;
}
td.ConfigListValue
{
text-align: right;
}
table.Totals
{
border-collapse: collapse;
text-align: right;
}
table.Totals td
{
padding: 2pt 4pt 2pt 4pt;
}
div.TestCaseResult
{
border: 1px solid #aaaaaa;
margin: 15pt 2pt 2pt 2pt;
padding: 0pt;
}
/* Background colors based on status code / status. */
.Pass { background: #80ff80; }
.Fail { background: #ff4040; }
.QualityWarning { background: #ffff00; }
.CompatibilityWarning { background: #ffff00; }
.Pending { background: #808080; }
.Running { background: #d3d3d3; }
.NotSupported { background: #ff69b4; }
.ResourceError { background: #ff4040; }
.InternalError { background: #ff1493; }
.Canceled { background: #808080; }
.Crash { background: #ffa500; }
.Timeout { background: #ffa500; }
.Disabled { background: #808080; }
.Terminated { background: #ffa500; }
.Missing { background: #808080; }
.OK { background: #80ff80; }

183
conformance/testlog.xsl Normal file
View file

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
drawElements Quality Program utilities
Copyright 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="BatchResult">
<html>
<head>
<link href="testlog.css" rel="stylesheet" type="text/css"/>
<title><xsl:value-of select="@FileName"/></title>
</head>
<body>
<table class="Totals">
<tr><td><b><xsl:text>Total cases</xsl:text></b></td><td><b><xsl:value-of select="ResultTotals/@All"/></b></td></tr>
<tr><td><xsl:text>Pass</xsl:text></td><td class="Pass"><xsl:value-of select="ResultTotals/@Pass"/></td></tr>
<tr><td><xsl:text>Fail</xsl:text></td><td class="Fail"><xsl:value-of select="ResultTotals/@Fail"/></td></tr>
<tr><td><xsl:text>Quality warning</xsl:text></td><td class="QualityWarning"><xsl:value-of select="ResultTotals/@QualityWarning"/></td></tr>
<tr><td><xsl:text>Compatibility warning</xsl:text></td><td class="CompatibilityWarning"><xsl:value-of select="ResultTotals/@CompatibilityWarning"/></td></tr>
<!-- <tr><td><xsl:text>Pending</xsl:text></td><td class="Pending"><xsl:value-of select="ResultTotals/@pending"/></td></tr> -->
<!-- <tr><td><xsl:text>Running</xsl:text></td><td class="Running"><xsl:value-of select="ResultTotals/@Running"/></td></tr> -->
<tr><td><xsl:text>Not supported</xsl:text></td><td class="NotSupported"><xsl:value-of select="ResultTotals/@NotSupported"/></td></tr>
<tr><td><xsl:text>Resource error</xsl:text></td><td class="ResourceError"><xsl:value-of select="ResultTotals/@ResourceError"/></td></tr>
<tr><td><xsl:text>Internal error</xsl:text></td><td class="InternalError"><xsl:value-of select="ResultTotals/@InternalError"/></td></tr>
<!-- <tr><td><xsl:text>Canceled</xsl:text></td><td class="Canceled"><xsl:value-of select="ResultTotals/@Canceled"/></td></tr> -->
<tr><td><xsl:text>Timeout</xsl:text></td><td class="Timeout"><xsl:value-of select="ResultTotals/@Timeout"/></td></tr>
<tr><td><xsl:text>Crash</xsl:text></td><td class="Crash"><xsl:value-of select="ResultTotals/@Crash"/></td></tr>
<tr><td><xsl:text>Disabled</xsl:text></td><td class="Disabled"><xsl:value-of select="ResultTotals/@Disabled"/></td></tr>
<!-- <tr><td><xsl:text>Terminated</xsl:text></td><td class="Terminated"><xsl:value-of select="ResultTotals/@Terminated"/></td></tr> -->
</table>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="/TestCaseResult">
<html>
<head>
<link href="testlog.css" rel="stylesheet" type="text/css"/>
<title><xsl:value-of select="@CasePath"/></title>
</head>
<body>
<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>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="BatchResult/TestCaseResult">
<div class="TestCaseResult">
<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>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="Section">
<div class="Section">
<h2><xsl:value-of select="@Description"/></h2>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="ImageSet">
<div class="ImageSet">
<h3><xsl:value-of select="@Description"/></h3>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="Image">
<div class="Image">
<xsl:value-of select="@Description"/><br/>
<img src="data:image/png;base64,{.}"/>
</div>
</xsl:template>
<xsl:template match="CompileInfo">
<div class="CompileInfo">
<h3 class="{@CompileStatus}"><xsl:value-of select="@Description"/></h3>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="ShaderProgram">
<div class="CompileInfo">
<h3 class="{@LinkStatus}"><xsl:text>Shader Program</xsl:text></h3>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="VertexShader">
<div class="Shader">
<h3 class="{@CompileStatus}"><xsl:text>Vertex Shader</xsl:text></h3>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="FragmentShader">
<div class="Shader">
<h3 class="{@CompileStatus}"><xsl:text>Fragment Shader</xsl:text></h3>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="Number">
<xsl:value-of select="@Description"/><xsl:text>: </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text><xsl:value-of select="@Unit"/><br/>
</xsl:template>
<xsl:template match="Result">
</xsl:template>
<xsl:template match="Text">
<xsl:value-of select="."/><br/>
</xsl:template>
<xsl:template match="KernelSource">
<pre class="KernelSource"><xsl:value-of select="."/></pre>
</xsl:template>
<xsl:template match="ShaderSource">
<pre class="ShaderSource"><xsl:value-of select="."/></pre>
</xsl:template>
<xsl:template match="InfoLog">
<pre class="InfoLog"><xsl:value-of select="."/></pre>
</xsl:template>
<xsl:template match="EglConfigSet">
<div class="Section">
<h2><xsl:value-of select="@Description"/></h2>
<table class="EglConfigList">
<tr>
<td class="ConfigListTitle"><xsl:text>ID</xsl:text></td>
<td class="ConfigListTitle"><xsl:text>R</xsl:text></td>
<td class="ConfigListTitle"><xsl:text>G</xsl:text></td>
<td class="ConfigListTitle"><xsl:text>B</xsl:text></td>
<td class="ConfigListTitle"><xsl:text>A</xsl:text></td>
<td class="ConfigListTitle"><xsl:text>D</xsl:text></td>
<td class="ConfigListTitle"><xsl:text>S</xsl:text></td>
<td class="ConfigListTitle"><xsl:text>mS</xsl:text></td>
</tr>
<xsl:apply-templates/>
</table>
</div>
</xsl:template>
<xsl:template match="EglConfig">
<tr>
<td class="ConfigListValue"><xsl:value-of select="@ConfigID"/></td>
<td class="ConfigListValue"><xsl:value-of select="@RedSize"/></td>
<td class="ConfigListValue"><xsl:value-of select="@GreenSize"/></td>
<td class="ConfigListValue"><xsl:value-of select="@BlueSize"/></td>
<td class="ConfigListValue"><xsl:value-of select="@AlphaSize"/></td>
<td class="ConfigListValue"><xsl:value-of select="@DepthSize"/></td>
<td class="ConfigListValue"><xsl:value-of select="@StencilSize"/></td>
<td class="ConfigListValue"><xsl:value-of select="@Samples"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>