Skip to content

Commit 3722b3c

Browse files
committedJul 25, 2002
Minor update for pathing to Base/FailScanner;
Update PerfScanner to use Base (very simplistic; you should probably use pdick's perf comparison scanner instead)
1 parent acac238 commit 3722b3c

File tree

3 files changed

+45
-109
lines changed

3 files changed

+45
-109
lines changed
 

‎BaseScanner.xsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
<xsl:template name="printScannerName">
5757
<xsl:element name="a">
58-
<xsl:attribute name="href"><xsl:text>src/xsl/BaseScanner.xsl</xsl:text></xsl:attribute>
58+
<xsl:attribute name="href"><xsl:text>BaseScanner.xsl</xsl:text></xsl:attribute>
5959
<xsl:text>BaseScanner</xsl:text>
6060
</xsl:element>
6161
</xsl:template>

‎FailScanner.xsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<xsl:template name="printScannerName">
2828
<xsl:element name="a">
29-
<xsl:attribute name="href"><xsl:text>src/xsl/FailScanner.xsl</xsl:text></xsl:attribute>
29+
<xsl:attribute name="href"><xsl:text>FailScanner.xsl</xsl:text></xsl:attribute>
3030
<xsl:text>FailScanner</xsl:text>
3131
</xsl:element>
3232
</xsl:template>

‎PerfScanner.xsl

+43-107
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,65 @@
11
<?xml version="1.0"?>
22
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3+
xmlns:lxslt="http://xml.apache.org/xslt"
4+
xmlns:redirect="org.apache.xalan.lib.Redirect"
5+
extension-element-prefixes="redirect"
36
version="1.0">
7+
8+
<!-- FileName: PerfScanner.xsl -->
9+
<!-- Author: shane_curcuru@us.ibm.com -->
10+
<!-- Purpose: Stylesheet for org.apache.qetest.XMLFileLogger
11+
logFiles that only prints out simple performance stats.
12+
Note that pdick is working on much more interesting
13+
stylesheets that compare the perf results from one
14+
test run to the previous one in a chart.
15+
-->
16+
17+
<!-- Import the BaseScanner for most duties; note this must be first in file -->
18+
<xsl:import href="BaseScanner.xsl"/>
19+
420
<xsl:output method="html"
521
doctype-public="-//W3C//DTD HTML 4.0 Transitional"/>
622

7-
<!-- FileName: FailScanner.xsl -->
8-
<!-- Author: shane_curcuru@us.ibm.com -->
9-
<!-- Purpose: Simple viewer for org.apache.qetest.XMLFileLogger
10-
logFile failing-only results put into simple HTML pages -->
23+
<lxslt:component prefix="redirect" elements="write open close" functions="">
24+
<lxslt:script lang="javaclass" src="org.apache.xalan.lib.Redirect"/>
25+
</lxslt:component>
1126

12-
<!-- Include constant definitions for results file elements,
13-
attributes, and values, copied from relevant Java code -->
14-
<xsl:include href="resultsConstants.xsl"/>
27+
<!-- Name of file for mini-fails redirected output -->
28+
<xsl:param name="redirectFilename">PerfScannerMini.html</xsl:param>
1529

16-
<!-- ================================== -->
17-
<!-- Main template-standalone: output an HTML page -->
18-
<xsl:template match="resultsfile">
19-
<html xmlns="http://www.w3.org/1999/xhtml">
20-
<head>
21-
<title><xsl:text>Test Results file: </xsl:text><xsl:value-of select="@logFile"/></title>
22-
</head>
23-
<body>
24-
<xsl:apply-templates/>
25-
</body>
26-
</html>
30+
<xsl:template name="printScannerName">
31+
<xsl:element name="a">
32+
<xsl:attribute name="href"><xsl:text>PerfScanner.xsl</xsl:text></xsl:attribute>
33+
<xsl:text>PerfScanner</xsl:text>
34+
</xsl:element>
2735
</xsl:template>
28-
29-
<!-- Output each whole testfile as a table; a small summary then individual results -->
30-
<!-- This is selected in ResultScanner.xsl directly -->
31-
<xsl:template match="testfile">
36+
<!-- ================================== -->
37+
<!-- Element templates: output basic data for each of the common
38+
test elements, like messages, checks, etc.
39+
-->
40+
<xsl:template match="testcase">
3241
<table frame="box" border="1" rules="groups"
3342
cellspacing="2" cellpadding="2"
3443
bgcolor="#FFFFEE">
3544
<caption>
36-
<b><xsl:value-of select="@filename"/><xsl:text>: </xsl:text></b><xsl:value-of select="@desc"/>
45+
<b><xsl:text>Testcase # </xsl:text></b>
46+
<!-- This creates the anchor as well as printing the @desc -->
47+
<xsl:call-template name="create-testcase-anchor">
48+
<xsl:with-param name="testcase" select="."/>
49+
</xsl:call-template>
3750
</caption>
38-
<!-- establish row widths here in our mini-summary -->
51+
<!-- establish row widths here -->
3952
<tr>
40-
<td width="7%"><xsl:text>Overall</xsl:text></td>
41-
<td>
42-
<xsl:text>Pass: </xsl:text>
43-
<xsl:value-of select="statistic[@desc='passCount[CASES]']/longval"/><xsl:text>/</xsl:text>
44-
<xsl:value-of select="statistic[@desc='passCount[CHECKS]']/longval"/><xsl:text>, </xsl:text>
45-
<xsl:text>Fail: </xsl:text>
46-
<xsl:value-of select="statistic[@desc='failCount[CASES]']/longval"/><xsl:text>/</xsl:text>
47-
<xsl:value-of select="statistic[@desc='failCount[CHECKS]']/longval"/><xsl:text>, </xsl:text>
48-
<xsl:text>Errr: </xsl:text>
49-
<xsl:value-of select="statistic[@desc='errrCount[CASES]']/longval"/><xsl:text>/</xsl:text>
50-
<xsl:value-of select="statistic[@desc='errrCount[CHECKS]']/longval"/><xsl:text>, </xsl:text>
51-
<xsl:text>Ambg: </xsl:text>
52-
<xsl:value-of select="statistic[@desc='ambgCount[CASES]']/longval"/><xsl:text>/</xsl:text>
53-
<xsl:value-of select="statistic[@desc='ambgCount[CHECKS]']/longval"/><xsl:text>, </xsl:text>
54-
<xsl:text>Incp: </xsl:text>
55-
<xsl:value-of select="statistic[@desc='incpCount[CASES]']/longval"/>
56-
</td>
53+
<td width="20"></td>
54+
<td></td>
5755
</tr>
58-
59-
<!-- Search on all subelements; don't bother restricting -->
60-
<xsl:apply-templates />
61-
</table>
62-
</xsl:template>
63-
64-
<!-- Output all testcases with minimal info in them -->
65-
<xsl:template match="testcase">
56+
<!-- Only select results and perf items -->
57+
<xsl:apply-templates select="checkresult | perf" mode="table"/>
6658
<tr>
6759
<td><br/><hr/></td>
68-
<td><xsl:text>Testcase #</xsl:text><xsl:value-of select="@desc"/><xsl:text> is </xsl:text><xsl:value-of select="caseresult/@result"/></td>
60+
<td><xsl:value-of select="caseresult/@result"/>:<xsl:text>Testcase #</xsl:text><xsl:value-of select="@desc"/></td>
6961
</tr>
70-
<!-- Only select results; we only have matches later for failed results -->
71-
<xsl:apply-templates select="checkresult | perf | fileCheck" />
72-
</xsl:template>
73-
74-
<!-- Printout basic pass/fail for each test -->
75-
<xsl:template match="checkresult">
76-
<tr>
77-
<td><xsl:value-of select="@result"/></td>
78-
<td>
79-
<xsl:if test="@id">
80-
<xsl:text>[</xsl:text><xsl:value-of select="@id"/><xsl:text>] </xsl:text>
81-
</xsl:if>
82-
<xsl:value-of select="@desc"/>
83-
</td>
84-
</tr>
85-
</xsl:template>
86-
87-
<!-- Print out simple block of perf info -->
88-
<xsl:template match="perf">
89-
<tr>
90-
<td><b><xsl:value-of select="@idref"/></b></td>
91-
<td>
92-
<xsl:value-of select="@processor"/><br/>
93-
<xsl:if test="@avgparsexsl"><xsl:text> avgparsexsl = </xsl:text><xsl:value-of select="@avgparsexsl"/></xsl:if>
94-
<xsl:if test="@singletransform"><xsl:text> singletransform = </xsl:text><xsl:value-of select="@singletransform"/></xsl:if>
95-
<xsl:if test="@iterations"><xsl:text> iterations = </xsl:text><xsl:value-of select="@iterations"/></xsl:if>
96-
<xsl:if test="@unparsedxml"><xsl:text> unparsedxml = </xsl:text><xsl:value-of select="@unparsedxml"/></xsl:if>
97-
<xsl:if test="@parsexsl"><xsl:text> parsexsl = </xsl:text><xsl:value-of select="@parsexsl"/></xsl:if>
98-
<xsl:if test="@avgetoe"><xsl:text> avgetoe = </xsl:text><xsl:value-of select="@avgetoe"/></xsl:if>
99-
<xsl:if test="@avgunparsedxml"><xsl:text> avgunparsedxml = </xsl:text><xsl:value-of select="@avgunparsedxml"/></xsl:if>
100-
<xsl:if test="@etoe"><xsl:text> etoe = </xsl:text><xsl:value-of select="@etoe"/></xsl:if>
101-
<xsl:if test="@OVERALL"><xsl:text> OVERALL = </xsl:text><xsl:value-of select="@OVERALL"/></xsl:if>
102-
<xsl:if test="@XSLREAD"><xsl:text> XSLREAD = </xsl:text><xsl:value-of select="@XSLREAD"/></xsl:if>
103-
<xsl:if test="@XSLBUILD"><xsl:text> XSLBUILD = </xsl:text><xsl:value-of select="@XSLBUILD"/></xsl:if>
104-
<xsl:if test="@XMLREAD"><xsl:text> XMLREAD = </xsl:text><xsl:value-of select="@XMLREAD"/></xsl:if>
105-
<xsl:if test="@XMLBUILD"><xsl:text> XMLBUILD = </xsl:text><xsl:value-of select="@XMLBUILD"/></xsl:if>
106-
<xsl:if test="@TRANSFORM"><xsl:text> TRANSFORM = </xsl:text><xsl:value-of select="@TRANSFORM"/></xsl:if>
107-
<xsl:if test="@RESULTWRITE"><xsl:text> RESULTWRITE = </xsl:text><xsl:value-of select="@RESULTWRITE"/></xsl:if>
108-
<xsl:if test="@FIRSTLATENCY"><xsl:text> FIRSTLATENCY = </xsl:text><xsl:value-of select="@FIRSTLATENCY"/></xsl:if>
109-
</td>
110-
</tr>
111-
</xsl:template>
112-
113-
<!-- Only selected from previous checkresult apply-templates -->
114-
<xsl:template match="fileCheck">
115-
<tr>
116-
<td><font size="-1">fileCheck</font></td>
117-
<td>
118-
<xsl:text>Actual file: </xsl:text><xsl:value-of select="@actual"/><br/>
119-
<pre><font size="-1"><xsl:value-of select="."/></font></pre>
120-
</td>
121-
</tr>
62+
</table>
12263
</xsl:template>
12364

124-
<!-- We implicitly skip all passes and non-related messages, etc. -->
125-
126-
<!-- Override default text node processing, so statistics, arbitrary messages, and other stuff is skipped -->
127-
<xsl:template match="text()"/>
128-
12965
</xsl:stylesheet>

0 commit comments

Comments
 (0)
Please sign in to comment.