1*0a6a1f1dSLionel Sambuc<?xml version="1.0" encoding="ISO-8859-1"?> 2*0a6a1f1dSLionel Sambuc<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp " ">]> 3*0a6a1f1dSLionel Sambuc 4*0a6a1f1dSLionel Sambuc<!-- 5*0a6a1f1dSLionel Sambuc ++ Automated Testing Framework (atf) 6*0a6a1f1dSLionel Sambuc ++ 7*0a6a1f1dSLionel Sambuc ++ Copyright (c) 2007 The NetBSD Foundation, Inc. 8*0a6a1f1dSLionel Sambuc ++ All rights reserved. 9*0a6a1f1dSLionel Sambuc ++ 10*0a6a1f1dSLionel Sambuc ++ Redistribution and use in source and binary forms, with or without 11*0a6a1f1dSLionel Sambuc ++ modification, are permitted provided that the following conditions 12*0a6a1f1dSLionel Sambuc ++ are met: 13*0a6a1f1dSLionel Sambuc ++ 1. Redistributions of source code must retain the above copyright 14*0a6a1f1dSLionel Sambuc ++ notice, this list of conditions and the following disclaimer. 15*0a6a1f1dSLionel Sambuc ++ 2. Redistributions in binary form must reproduce the above copyright 16*0a6a1f1dSLionel Sambuc ++ notice, this list of conditions and the following disclaimer in the 17*0a6a1f1dSLionel Sambuc ++ documentation and/or other materials provided with the distribution. 18*0a6a1f1dSLionel Sambuc ++ 19*0a6a1f1dSLionel Sambuc ++ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND 20*0a6a1f1dSLionel Sambuc ++ CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 21*0a6a1f1dSLionel Sambuc ++ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 22*0a6a1f1dSLionel Sambuc ++ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23*0a6a1f1dSLionel Sambuc ++ IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY 24*0a6a1f1dSLionel Sambuc ++ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25*0a6a1f1dSLionel Sambuc ++ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 26*0a6a1f1dSLionel Sambuc ++ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27*0a6a1f1dSLionel Sambuc ++ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 28*0a6a1f1dSLionel Sambuc ++ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29*0a6a1f1dSLionel Sambuc ++ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 30*0a6a1f1dSLionel Sambuc ++ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31*0a6a1f1dSLionel Sambuc --> 32*0a6a1f1dSLionel Sambuc 33*0a6a1f1dSLionel Sambuc<xsl:stylesheet version="1.0" 34*0a6a1f1dSLionel Sambuc xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 35*0a6a1f1dSLionel Sambuc 36*0a6a1f1dSLionel Sambuc <!-- Parameters that can be overriden by the user. --> 37*0a6a1f1dSLionel Sambuc <xsl:param name="global.css">tests-results.css</xsl:param> 38*0a6a1f1dSLionel Sambuc <xsl:param name="global.title">ATF Tests Results</xsl:param> 39*0a6a1f1dSLionel Sambuc 40*0a6a1f1dSLionel Sambuc <xsl:variable name="ntps" 41*0a6a1f1dSLionel Sambuc select="count(tests-results/tp)" /> 42*0a6a1f1dSLionel Sambuc <xsl:variable name="ntps-failed" 43*0a6a1f1dSLionel Sambuc select="count(tests-results/tp/failed)" /> 44*0a6a1f1dSLionel Sambuc <xsl:variable name="ntcs" 45*0a6a1f1dSLionel Sambuc select="count(tests-results/tp/tc)" /> 46*0a6a1f1dSLionel Sambuc <xsl:variable name="ntcs-passed" 47*0a6a1f1dSLionel Sambuc select="count(tests-results/tp/tc/passed)" /> 48*0a6a1f1dSLionel Sambuc <xsl:variable name="ntcs-failed" 49*0a6a1f1dSLionel Sambuc select="count(tests-results/tp/tc/failed)" /> 50*0a6a1f1dSLionel Sambuc <xsl:variable name="ntcs-skipped" 51*0a6a1f1dSLionel Sambuc select="count(tests-results/tp/tc/skipped)" /> 52*0a6a1f1dSLionel Sambuc <xsl:variable name="ntcs-xfail" 53*0a6a1f1dSLionel Sambuc select="count(tests-results/tp/tc/expected_death) + 54*0a6a1f1dSLionel Sambuc count(tests-results/tp/tc/expected_exit) + 55*0a6a1f1dSLionel Sambuc count(tests-results/tp/tc/expected_failure) + 56*0a6a1f1dSLionel Sambuc count(tests-results/tp/tc/expected_signal) + 57*0a6a1f1dSLionel Sambuc count(tests-results/tp/tc/expected_timeout)" /> 58*0a6a1f1dSLionel Sambuc 59*0a6a1f1dSLionel Sambuc <xsl:template match="/"> 60*0a6a1f1dSLionel Sambuc <xsl:copy> 61*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="@*|node()" /> 62*0a6a1f1dSLionel Sambuc </xsl:copy> 63*0a6a1f1dSLionel Sambuc </xsl:template> 64*0a6a1f1dSLionel Sambuc 65*0a6a1f1dSLionel Sambuc <xsl:template match="tests-results"> 66*0a6a1f1dSLionel Sambuc <html xmlns="http://www.w3.org/1999/xhtml"> 67*0a6a1f1dSLionel Sambuc <head> 68*0a6a1f1dSLionel Sambuc <meta http-equiv="Content-Type" 69*0a6a1f1dSLionel Sambuc content="text/html; charset=iso-8859-1" /> 70*0a6a1f1dSLionel Sambuc <link rel="stylesheet" type="text/css" href="{$global.css}" /> 71*0a6a1f1dSLionel Sambuc 72*0a6a1f1dSLionel Sambuc <title><xsl:value-of select="$global.title" /></title> 73*0a6a1f1dSLionel Sambuc </head> 74*0a6a1f1dSLionel Sambuc 75*0a6a1f1dSLionel Sambuc <body> 76*0a6a1f1dSLionel Sambuc <h1><xsl:value-of select="$global.title" /></h1> 77*0a6a1f1dSLionel Sambuc 78*0a6a1f1dSLionel Sambuc <xsl:call-template name="info-top" /> 79*0a6a1f1dSLionel Sambuc <xsl:call-template name="tcs-summary" /> 80*0a6a1f1dSLionel Sambuc <xsl:if test="$ntcs-failed > 0"> 81*0a6a1f1dSLionel Sambuc <xsl:call-template name="failed-tcs-summary" /> 82*0a6a1f1dSLionel Sambuc </xsl:if> 83*0a6a1f1dSLionel Sambuc <xsl:if test="$ntcs-xfail > 0"> 84*0a6a1f1dSLionel Sambuc <xsl:call-template name="xfail-tcs-summary" /> 85*0a6a1f1dSLionel Sambuc </xsl:if> 86*0a6a1f1dSLionel Sambuc <xsl:if test="$ntcs-skipped > 0"> 87*0a6a1f1dSLionel Sambuc <xsl:call-template name="skipped-tcs-summary" /> 88*0a6a1f1dSLionel Sambuc </xsl:if> 89*0a6a1f1dSLionel Sambuc <xsl:if test="$ntps-failed > 0"> 90*0a6a1f1dSLionel Sambuc <xsl:call-template name="failed-tps-summary" /> 91*0a6a1f1dSLionel Sambuc </xsl:if> 92*0a6a1f1dSLionel Sambuc <xsl:call-template name="info-bottom" /> 93*0a6a1f1dSLionel Sambuc 94*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tp" mode="details" /> 95*0a6a1f1dSLionel Sambuc </body> 96*0a6a1f1dSLionel Sambuc </html> 97*0a6a1f1dSLionel Sambuc </xsl:template> 98*0a6a1f1dSLionel Sambuc 99*0a6a1f1dSLionel Sambuc <xsl:template name="info-top"> 100*0a6a1f1dSLionel Sambuc <h2>Execution summary</h2> 101*0a6a1f1dSLionel Sambuc 102*0a6a1f1dSLionel Sambuc <table class="summary"> 103*0a6a1f1dSLionel Sambuc <tr> 104*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Item</p></th> 105*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Value</p></th> 106*0a6a1f1dSLionel Sambuc </tr> 107*0a6a1f1dSLionel Sambuc 108*0a6a1f1dSLionel Sambuc <tr class="group"> 109*0a6a1f1dSLionel Sambuc <td colspan="2"><p>ATF</p></td> 110*0a6a1f1dSLionel Sambuc </tr> 111*0a6a1f1dSLionel Sambuc <tr class="entry"> 112*0a6a1f1dSLionel Sambuc <td><p>Version</p></td> 113*0a6a1f1dSLionel Sambuc <td><p><xsl:apply-templates 114*0a6a1f1dSLionel Sambuc select="info[@class = 'atf.version']" /></p></td> 115*0a6a1f1dSLionel Sambuc </tr> 116*0a6a1f1dSLionel Sambuc 117*0a6a1f1dSLionel Sambuc <tr class="group"> 118*0a6a1f1dSLionel Sambuc <td colspan="2"><p>Timings</p></td> 119*0a6a1f1dSLionel Sambuc </tr> 120*0a6a1f1dSLionel Sambuc <tr class="entry"> 121*0a6a1f1dSLionel Sambuc <td><p>Start time of tests</p></td> 122*0a6a1f1dSLionel Sambuc <td><p><xsl:apply-templates 123*0a6a1f1dSLionel Sambuc select="info[@class = 'time.start']" /></p></td> 124*0a6a1f1dSLionel Sambuc </tr> 125*0a6a1f1dSLionel Sambuc <tr class="entry"> 126*0a6a1f1dSLionel Sambuc <td><p>End time of tests</p></td> 127*0a6a1f1dSLionel Sambuc <td><p><xsl:apply-templates 128*0a6a1f1dSLionel Sambuc select="info[@class = 'time.end']" /></p></td> 129*0a6a1f1dSLionel Sambuc </tr> 130*0a6a1f1dSLionel Sambuc 131*0a6a1f1dSLionel Sambuc <tr class="group"> 132*0a6a1f1dSLionel Sambuc <td colspan="2"><p>System information</p></td> 133*0a6a1f1dSLionel Sambuc </tr> 134*0a6a1f1dSLionel Sambuc <tr class="entry"> 135*0a6a1f1dSLionel Sambuc <td><p>Host name</p></td> 136*0a6a1f1dSLionel Sambuc <td><p><xsl:apply-templates 137*0a6a1f1dSLionel Sambuc select="info[@class = 'uname.nodename']" /></p></td> 138*0a6a1f1dSLionel Sambuc </tr> 139*0a6a1f1dSLionel Sambuc <tr class="entry"> 140*0a6a1f1dSLionel Sambuc <td><p>Operating system</p></td> 141*0a6a1f1dSLionel Sambuc <td><p><xsl:apply-templates 142*0a6a1f1dSLionel Sambuc select="info[@class = 'uname.sysname']" /></p></td> 143*0a6a1f1dSLionel Sambuc </tr> 144*0a6a1f1dSLionel Sambuc <tr class="entry"> 145*0a6a1f1dSLionel Sambuc <td><p>Operating system release</p></td> 146*0a6a1f1dSLionel Sambuc <td><p><xsl:apply-templates 147*0a6a1f1dSLionel Sambuc select="info[@class = 'uname.release']" /></p></td> 148*0a6a1f1dSLionel Sambuc </tr> 149*0a6a1f1dSLionel Sambuc <tr class="entry"> 150*0a6a1f1dSLionel Sambuc <td><p>Operating system version</p></td> 151*0a6a1f1dSLionel Sambuc <td><p><xsl:apply-templates 152*0a6a1f1dSLionel Sambuc select="info[@class = 'uname.version']" /></p></td> 153*0a6a1f1dSLionel Sambuc </tr> 154*0a6a1f1dSLionel Sambuc <tr class="entry"> 155*0a6a1f1dSLionel Sambuc <td><p>Platform</p></td> 156*0a6a1f1dSLionel Sambuc <td><p><xsl:apply-templates 157*0a6a1f1dSLionel Sambuc select="info[@class = 'uname.machine']" /></p></td> 158*0a6a1f1dSLionel Sambuc </tr> 159*0a6a1f1dSLionel Sambuc 160*0a6a1f1dSLionel Sambuc <tr class="group"> 161*0a6a1f1dSLionel Sambuc <td colspan="2"><p>Tests results</p></td> 162*0a6a1f1dSLionel Sambuc </tr> 163*0a6a1f1dSLionel Sambuc <tr class="entry"> 164*0a6a1f1dSLionel Sambuc <td><p>Root</p></td> 165*0a6a1f1dSLionel Sambuc <td><p><xsl:value-of 166*0a6a1f1dSLionel Sambuc select="info[@class = 'tests.root']" /></p></td> 167*0a6a1f1dSLionel Sambuc </tr> 168*0a6a1f1dSLionel Sambuc <tr class="entry"> 169*0a6a1f1dSLionel Sambuc <td><p>Test programs</p></td> 170*0a6a1f1dSLionel Sambuc <td class="numeric"><p><xsl:value-of select="$ntps" /></p></td> 171*0a6a1f1dSLionel Sambuc </tr> 172*0a6a1f1dSLionel Sambuc <tr class="entry"> 173*0a6a1f1dSLionel Sambuc <xsl:choose> 174*0a6a1f1dSLionel Sambuc <xsl:when test="$ntps-failed > 0"> 175*0a6a1f1dSLionel Sambuc <td><p><a href="#failed-tps-summary">Bogus test 176*0a6a1f1dSLionel Sambuc programs</a></p></td> 177*0a6a1f1dSLionel Sambuc <td class="numeric-error"> 178*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="$ntps-failed" /></p> 179*0a6a1f1dSLionel Sambuc </td> 180*0a6a1f1dSLionel Sambuc </xsl:when> 181*0a6a1f1dSLionel Sambuc <xsl:otherwise> 182*0a6a1f1dSLionel Sambuc <td><p>Bogus test programs</p></td> 183*0a6a1f1dSLionel Sambuc <td class="numeric"> 184*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="$ntps-failed" /></p> 185*0a6a1f1dSLionel Sambuc </td> 186*0a6a1f1dSLionel Sambuc </xsl:otherwise> 187*0a6a1f1dSLionel Sambuc </xsl:choose> 188*0a6a1f1dSLionel Sambuc </tr> 189*0a6a1f1dSLionel Sambuc <tr class="entry"> 190*0a6a1f1dSLionel Sambuc <td><p>Test cases</p></td> 191*0a6a1f1dSLionel Sambuc <td class="numeric"><p><xsl:value-of select="$ntcs" /></p></td> 192*0a6a1f1dSLionel Sambuc </tr> 193*0a6a1f1dSLionel Sambuc <tr class="entry"> 194*0a6a1f1dSLionel Sambuc <td><p>Passed test cases</p></td> 195*0a6a1f1dSLionel Sambuc <td class="numeric"><p><xsl:value-of select="$ntcs-passed" /></p></td> 196*0a6a1f1dSLionel Sambuc </tr> 197*0a6a1f1dSLionel Sambuc <tr class="entry"> 198*0a6a1f1dSLionel Sambuc <xsl:choose> 199*0a6a1f1dSLionel Sambuc <xsl:when test="$ntcs-failed > 0"> 200*0a6a1f1dSLionel Sambuc <td><p><a href="#failed-tcs-summary">Failed test 201*0a6a1f1dSLionel Sambuc cases</a></p></td> 202*0a6a1f1dSLionel Sambuc <td class="numeric-error"> 203*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="$ntcs-failed" /></p> 204*0a6a1f1dSLionel Sambuc </td> 205*0a6a1f1dSLionel Sambuc </xsl:when> 206*0a6a1f1dSLionel Sambuc <xsl:otherwise> 207*0a6a1f1dSLionel Sambuc <td><p>Failed test cases</p></td> 208*0a6a1f1dSLionel Sambuc <td class="numeric"> 209*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="$ntcs-failed" /></p> 210*0a6a1f1dSLionel Sambuc </td> 211*0a6a1f1dSLionel Sambuc </xsl:otherwise> 212*0a6a1f1dSLionel Sambuc </xsl:choose> 213*0a6a1f1dSLionel Sambuc </tr> 214*0a6a1f1dSLionel Sambuc <tr class="entry"> 215*0a6a1f1dSLionel Sambuc <xsl:choose> 216*0a6a1f1dSLionel Sambuc <xsl:when test="$ntcs-xfail > 0"> 217*0a6a1f1dSLionel Sambuc <td><p><a href="#xfail-tcs-summary">Expected 218*0a6a1f1dSLionel Sambuc failures</a></p></td> 219*0a6a1f1dSLionel Sambuc <td class="numeric-warning"> 220*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="$ntcs-xfail" /></p> 221*0a6a1f1dSLionel Sambuc </td> 222*0a6a1f1dSLionel Sambuc </xsl:when> 223*0a6a1f1dSLionel Sambuc <xsl:otherwise> 224*0a6a1f1dSLionel Sambuc <td><p>Expected failures</p></td> 225*0a6a1f1dSLionel Sambuc <td class="numeric"> 226*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="$ntcs-xfail" /></p> 227*0a6a1f1dSLionel Sambuc </td> 228*0a6a1f1dSLionel Sambuc </xsl:otherwise> 229*0a6a1f1dSLionel Sambuc </xsl:choose> 230*0a6a1f1dSLionel Sambuc </tr> 231*0a6a1f1dSLionel Sambuc <tr class="entry"> 232*0a6a1f1dSLionel Sambuc <xsl:choose> 233*0a6a1f1dSLionel Sambuc <xsl:when test="$ntcs-skipped > 0"> 234*0a6a1f1dSLionel Sambuc <td><p><a href="#skipped-tcs-summary">Skipped test 235*0a6a1f1dSLionel Sambuc cases</a></p></td> 236*0a6a1f1dSLionel Sambuc <td class="numeric-warning"> 237*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="$ntcs-skipped" /></p> 238*0a6a1f1dSLionel Sambuc </td> 239*0a6a1f1dSLionel Sambuc </xsl:when> 240*0a6a1f1dSLionel Sambuc <xsl:otherwise> 241*0a6a1f1dSLionel Sambuc <td><p>Skipped test cases</p></td> 242*0a6a1f1dSLionel Sambuc <td class="numeric"> 243*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="$ntcs-skipped" /></p> 244*0a6a1f1dSLionel Sambuc </td> 245*0a6a1f1dSLionel Sambuc </xsl:otherwise> 246*0a6a1f1dSLionel Sambuc </xsl:choose> 247*0a6a1f1dSLionel Sambuc </tr> 248*0a6a1f1dSLionel Sambuc 249*0a6a1f1dSLionel Sambuc <tr class="group"> 250*0a6a1f1dSLionel Sambuc <td colspan="2"><p><a href="#execution-details">See more execution 251*0a6a1f1dSLionel Sambuc details</a></p></td> 252*0a6a1f1dSLionel Sambuc </tr> 253*0a6a1f1dSLionel Sambuc </table> 254*0a6a1f1dSLionel Sambuc </xsl:template> 255*0a6a1f1dSLionel Sambuc 256*0a6a1f1dSLionel Sambuc <xsl:template name="info-bottom"> 257*0a6a1f1dSLionel Sambuc <a name="execution-details" /> 258*0a6a1f1dSLionel Sambuc <h2 id="execution-details">Execution details</h2> 259*0a6a1f1dSLionel Sambuc 260*0a6a1f1dSLionel Sambuc <h3>Environment variables</h3> 261*0a6a1f1dSLionel Sambuc 262*0a6a1f1dSLionel Sambuc <ul> 263*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="info[@class = 'env']"> 264*0a6a1f1dSLionel Sambuc <xsl:sort /> 265*0a6a1f1dSLionel Sambuc </xsl:apply-templates> 266*0a6a1f1dSLionel Sambuc </ul> 267*0a6a1f1dSLionel Sambuc </xsl:template> 268*0a6a1f1dSLionel Sambuc 269*0a6a1f1dSLionel Sambuc <xsl:template match="info[@class = 'env']"> 270*0a6a1f1dSLionel Sambuc <li> 271*0a6a1f1dSLionel Sambuc <p><xsl:apply-templates /></p> 272*0a6a1f1dSLionel Sambuc </li> 273*0a6a1f1dSLionel Sambuc </xsl:template> 274*0a6a1f1dSLionel Sambuc 275*0a6a1f1dSLionel Sambuc <xsl:template name="tcs-summary"> 276*0a6a1f1dSLionel Sambuc <h2>Test cases summary</h2> 277*0a6a1f1dSLionel Sambuc 278*0a6a1f1dSLionel Sambuc <table class="tcs-summary"> 279*0a6a1f1dSLionel Sambuc <tr> 280*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Test case</p></th> 281*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Result</p></th> 282*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Reason</p></th> 283*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Duration</p></th> 284*0a6a1f1dSLionel Sambuc </tr> 285*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tp" mode="summary"> 286*0a6a1f1dSLionel Sambuc <xsl:with-param name="which">all</xsl:with-param> 287*0a6a1f1dSLionel Sambuc </xsl:apply-templates> 288*0a6a1f1dSLionel Sambuc </table> 289*0a6a1f1dSLionel Sambuc </xsl:template> 290*0a6a1f1dSLionel Sambuc 291*0a6a1f1dSLionel Sambuc <xsl:template name="xfail-tcs-summary"> 292*0a6a1f1dSLionel Sambuc <a name="xfail-tcs-summary" /> 293*0a6a1f1dSLionel Sambuc <h2 id="xfail-tcs-summary">Expected failures summary</h2> 294*0a6a1f1dSLionel Sambuc 295*0a6a1f1dSLionel Sambuc <table class="tcs-summary"> 296*0a6a1f1dSLionel Sambuc <tr> 297*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Test case</p></th> 298*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Result</p></th> 299*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Reason</p></th> 300*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Duration</p></th> 301*0a6a1f1dSLionel Sambuc </tr> 302*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tp" mode="summary"> 303*0a6a1f1dSLionel Sambuc <xsl:with-param name="which">xfail</xsl:with-param> 304*0a6a1f1dSLionel Sambuc </xsl:apply-templates> 305*0a6a1f1dSLionel Sambuc </table> 306*0a6a1f1dSLionel Sambuc </xsl:template> 307*0a6a1f1dSLionel Sambuc 308*0a6a1f1dSLionel Sambuc <xsl:template name="failed-tcs-summary"> 309*0a6a1f1dSLionel Sambuc <a name="failed-tcs-summary" /> 310*0a6a1f1dSLionel Sambuc <h2 id="failed-tcs-summary">Failed test cases summary</h2> 311*0a6a1f1dSLionel Sambuc 312*0a6a1f1dSLionel Sambuc <table class="tcs-summary"> 313*0a6a1f1dSLionel Sambuc <tr> 314*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Test case</p></th> 315*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Result</p></th> 316*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Reason</p></th> 317*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Duration</p></th> 318*0a6a1f1dSLionel Sambuc </tr> 319*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tp" mode="summary"> 320*0a6a1f1dSLionel Sambuc <xsl:with-param name="which">failed</xsl:with-param> 321*0a6a1f1dSLionel Sambuc </xsl:apply-templates> 322*0a6a1f1dSLionel Sambuc </table> 323*0a6a1f1dSLionel Sambuc </xsl:template> 324*0a6a1f1dSLionel Sambuc 325*0a6a1f1dSLionel Sambuc <xsl:template name="failed-tps-summary"> 326*0a6a1f1dSLionel Sambuc <a name="failed-tps-summary" /> 327*0a6a1f1dSLionel Sambuc <h2 id="failed-tps-summary">Bogus test programs summary</h2> 328*0a6a1f1dSLionel Sambuc 329*0a6a1f1dSLionel Sambuc <table class="tcs-summary"> 330*0a6a1f1dSLionel Sambuc <tr> 331*0a6a1f1dSLionel Sambuc <th class="nobr">Test program</th> 332*0a6a1f1dSLionel Sambuc </tr> 333*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tp" mode="summary"> 334*0a6a1f1dSLionel Sambuc <xsl:with-param name="which">bogus</xsl:with-param> 335*0a6a1f1dSLionel Sambuc </xsl:apply-templates> 336*0a6a1f1dSLionel Sambuc </table> 337*0a6a1f1dSLionel Sambuc </xsl:template> 338*0a6a1f1dSLionel Sambuc 339*0a6a1f1dSLionel Sambuc <xsl:template name="skipped-tcs-summary"> 340*0a6a1f1dSLionel Sambuc <a name="skipped-tcs-summary" /> 341*0a6a1f1dSLionel Sambuc <h2 id="skipped-tcs-summary">Skipped test cases summary</h2> 342*0a6a1f1dSLionel Sambuc 343*0a6a1f1dSLionel Sambuc <table class="tcs-summary"> 344*0a6a1f1dSLionel Sambuc <tr> 345*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Test case</p></th> 346*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Result</p></th> 347*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Reason</p></th> 348*0a6a1f1dSLionel Sambuc <th class="nobr"><p>Duration</p></th> 349*0a6a1f1dSLionel Sambuc </tr> 350*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tp" mode="summary"> 351*0a6a1f1dSLionel Sambuc <xsl:with-param name="which">skipped</xsl:with-param> 352*0a6a1f1dSLionel Sambuc </xsl:apply-templates> 353*0a6a1f1dSLionel Sambuc </table> 354*0a6a1f1dSLionel Sambuc </xsl:template> 355*0a6a1f1dSLionel Sambuc 356*0a6a1f1dSLionel Sambuc <xsl:template match="tp" mode="summary"> 357*0a6a1f1dSLionel Sambuc <xsl:param name="which" /> 358*0a6a1f1dSLionel Sambuc 359*0a6a1f1dSLionel Sambuc <xsl:variable name="chosen"> 360*0a6a1f1dSLionel Sambuc <xsl:choose> 361*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'bogus' and failed">yes</xsl:when> 362*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'passed' and tc/passed">yes</xsl:when> 363*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'failed' and tc/failed">yes</xsl:when> 364*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 365*0a6a1f1dSLionel Sambuc tc/expected_death">yes</xsl:when> 366*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 367*0a6a1f1dSLionel Sambuc tc/expected_exit">yes</xsl:when> 368*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 369*0a6a1f1dSLionel Sambuc tc/expected_failure">yes</xsl:when> 370*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 371*0a6a1f1dSLionel Sambuc tc/expected_signal">yes</xsl:when> 372*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 373*0a6a1f1dSLionel Sambuc tc/expected_timeout">yes</xsl:when> 374*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'skipped' and tc/skipped">yes</xsl:when> 375*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'all'">yes</xsl:when> 376*0a6a1f1dSLionel Sambuc <xsl:otherwise>no</xsl:otherwise> 377*0a6a1f1dSLionel Sambuc </xsl:choose> 378*0a6a1f1dSLionel Sambuc </xsl:variable> 379*0a6a1f1dSLionel Sambuc 380*0a6a1f1dSLionel Sambuc <xsl:if test="$chosen = 'yes'"> 381*0a6a1f1dSLionel Sambuc <tr> 382*0a6a1f1dSLionel Sambuc <td class="tp-id" colspan="3"> 383*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="@id" /></p> 384*0a6a1f1dSLionel Sambuc </td> 385*0a6a1f1dSLionel Sambuc <td class="tp-numeric"> 386*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="tp-time" />s</p> 387*0a6a1f1dSLionel Sambuc </td> 388*0a6a1f1dSLionel Sambuc </tr> 389*0a6a1f1dSLionel Sambuc <xsl:if test="$which != 'bogus'"> 390*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tc" mode="summary"> 391*0a6a1f1dSLionel Sambuc <xsl:with-param name="which" select="$which" /> 392*0a6a1f1dSLionel Sambuc </xsl:apply-templates> 393*0a6a1f1dSLionel Sambuc </xsl:if> 394*0a6a1f1dSLionel Sambuc </xsl:if> 395*0a6a1f1dSLionel Sambuc </xsl:template> 396*0a6a1f1dSLionel Sambuc 397*0a6a1f1dSLionel Sambuc <xsl:template match="tc" mode="summary"> 398*0a6a1f1dSLionel Sambuc <xsl:param name="which" /> 399*0a6a1f1dSLionel Sambuc 400*0a6a1f1dSLionel Sambuc <xsl:variable name="full-id" 401*0a6a1f1dSLionel Sambuc select="concat(translate(../@id, '/', '_'), '_', @id)" /> 402*0a6a1f1dSLionel Sambuc 403*0a6a1f1dSLionel Sambuc <xsl:variable name="chosen"> 404*0a6a1f1dSLionel Sambuc <xsl:choose> 405*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'passed' and ./passed">yes</xsl:when> 406*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'failed' and ./failed">yes</xsl:when> 407*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 408*0a6a1f1dSLionel Sambuc ./expected_death">yes</xsl:when> 409*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 410*0a6a1f1dSLionel Sambuc ./expected_exit">yes</xsl:when> 411*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 412*0a6a1f1dSLionel Sambuc ./expected_failure">yes</xsl:when> 413*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 414*0a6a1f1dSLionel Sambuc ./expected_signal">yes</xsl:when> 415*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'xfail' and 416*0a6a1f1dSLionel Sambuc ./expected_timeout">yes</xsl:when> 417*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'skipped' and ./skipped">yes</xsl:when> 418*0a6a1f1dSLionel Sambuc <xsl:when test="$which = 'all'">yes</xsl:when> 419*0a6a1f1dSLionel Sambuc <xsl:otherwise>no</xsl:otherwise> 420*0a6a1f1dSLionel Sambuc </xsl:choose> 421*0a6a1f1dSLionel Sambuc </xsl:variable> 422*0a6a1f1dSLionel Sambuc 423*0a6a1f1dSLionel Sambuc <xsl:if test="$chosen = 'yes'"> 424*0a6a1f1dSLionel Sambuc <tr> 425*0a6a1f1dSLionel Sambuc <td class="tc-id"> 426*0a6a1f1dSLionel Sambuc <xsl:choose> 427*0a6a1f1dSLionel Sambuc <xsl:when test="expected_death|expected_exit|expected_failure| 428*0a6a1f1dSLionel Sambuc expected_signal|expected_timeout|failed|skipped"> 429*0a6a1f1dSLionel Sambuc <p><a href="#{$full-id}"><xsl:value-of select="@id" /></a></p> 430*0a6a1f1dSLionel Sambuc </xsl:when> 431*0a6a1f1dSLionel Sambuc <xsl:otherwise> 432*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="@id" /></p> 433*0a6a1f1dSLionel Sambuc </xsl:otherwise> 434*0a6a1f1dSLionel Sambuc </xsl:choose> 435*0a6a1f1dSLionel Sambuc </td> 436*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="expected_death|expected_exit| 437*0a6a1f1dSLionel Sambuc expected_failure|expected_timeout| 438*0a6a1f1dSLionel Sambuc expected_signal|failed|passed| 439*0a6a1f1dSLionel Sambuc skipped" mode="tc" /> 440*0a6a1f1dSLionel Sambuc <td class="numeric"> 441*0a6a1f1dSLionel Sambuc <p><xsl:value-of select="tc-time" />s</p> 442*0a6a1f1dSLionel Sambuc </td> 443*0a6a1f1dSLionel Sambuc </tr> 444*0a6a1f1dSLionel Sambuc </xsl:if> 445*0a6a1f1dSLionel Sambuc </xsl:template> 446*0a6a1f1dSLionel Sambuc 447*0a6a1f1dSLionel Sambuc <xsl:template match="passed" mode="tc"> 448*0a6a1f1dSLionel Sambuc <td class="tcr-passed"><p class="nobr">Passed</p></td> 449*0a6a1f1dSLionel Sambuc <td class="tcr-reason"><p>N/A</p></td> 450*0a6a1f1dSLionel Sambuc </xsl:template> 451*0a6a1f1dSLionel Sambuc 452*0a6a1f1dSLionel Sambuc <xsl:template match="expected_death" mode="tc"> 453*0a6a1f1dSLionel Sambuc <td class="tcr-xfail"><p class="nobr">Expected death</p></td> 454*0a6a1f1dSLionel Sambuc <td class="tcr-reason"><p><xsl:apply-templates /></p></td> 455*0a6a1f1dSLionel Sambuc </xsl:template> 456*0a6a1f1dSLionel Sambuc 457*0a6a1f1dSLionel Sambuc <xsl:template match="expected_exit" mode="tc"> 458*0a6a1f1dSLionel Sambuc <td class="tcr-xfail"><p class="nobr">Expected exit</p></td> 459*0a6a1f1dSLionel Sambuc <td class="tcr-reason"><p><xsl:apply-templates /></p></td> 460*0a6a1f1dSLionel Sambuc </xsl:template> 461*0a6a1f1dSLionel Sambuc 462*0a6a1f1dSLionel Sambuc <xsl:template match="expected_failure" mode="tc"> 463*0a6a1f1dSLionel Sambuc <td class="tcr-xfail"><p class="nobr">Expected failure</p></td> 464*0a6a1f1dSLionel Sambuc <td class="tcr-reason"><p><xsl:apply-templates /></p></td> 465*0a6a1f1dSLionel Sambuc </xsl:template> 466*0a6a1f1dSLionel Sambuc 467*0a6a1f1dSLionel Sambuc <xsl:template match="expected_timeout" mode="tc"> 468*0a6a1f1dSLionel Sambuc <td class="tcr-xfail"><p class="nobr">Expected timeout</p></td> 469*0a6a1f1dSLionel Sambuc <td class="tcr-reason"><p><xsl:apply-templates /></p></td> 470*0a6a1f1dSLionel Sambuc </xsl:template> 471*0a6a1f1dSLionel Sambuc 472*0a6a1f1dSLionel Sambuc <xsl:template match="expected_signal" mode="tc"> 473*0a6a1f1dSLionel Sambuc <td class="tcr-xfail"><p class="nobr">Expected signal</p></td> 474*0a6a1f1dSLionel Sambuc <td class="tcr-reason"><p><xsl:apply-templates /></p></td> 475*0a6a1f1dSLionel Sambuc </xsl:template> 476*0a6a1f1dSLionel Sambuc 477*0a6a1f1dSLionel Sambuc <xsl:template match="failed" mode="tc"> 478*0a6a1f1dSLionel Sambuc <td class="tcr-failed"><p class="nobr">Failed</p></td> 479*0a6a1f1dSLionel Sambuc <td class="tcr-reason"><p><xsl:apply-templates /></p></td> 480*0a6a1f1dSLionel Sambuc </xsl:template> 481*0a6a1f1dSLionel Sambuc 482*0a6a1f1dSLionel Sambuc <xsl:template match="skipped" mode="tc"> 483*0a6a1f1dSLionel Sambuc <td class="tcr-skipped"><p class="nobr">Skipped</p></td> 484*0a6a1f1dSLionel Sambuc <td class="tcr-reason"><p><xsl:apply-templates /></p></td> 485*0a6a1f1dSLionel Sambuc </xsl:template> 486*0a6a1f1dSLionel Sambuc 487*0a6a1f1dSLionel Sambuc <xsl:template match="tp" mode="details"> 488*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tc[expected_death|expected_exit| 489*0a6a1f1dSLionel Sambuc expected_failure|expected_signal| 490*0a6a1f1dSLionel Sambuc expected_timeout|failed|skipped]" 491*0a6a1f1dSLionel Sambuc mode="details" /> 492*0a6a1f1dSLionel Sambuc </xsl:template> 493*0a6a1f1dSLionel Sambuc 494*0a6a1f1dSLionel Sambuc <xsl:template match="failed" mode="details"> 495*0a6a1f1dSLionel Sambuc <p class="term"><strong>FAILED</strong>: <xsl:apply-templates /></p> 496*0a6a1f1dSLionel Sambuc </xsl:template> 497*0a6a1f1dSLionel Sambuc 498*0a6a1f1dSLionel Sambuc <xsl:template match="expected_death|expected_exit|expected_failure| 499*0a6a1f1dSLionel Sambuc expected_signal|expected_timeout" mode="details"> 500*0a6a1f1dSLionel Sambuc <p class="term"><strong>XFAIL</strong>: <xsl:apply-templates /></p> 501*0a6a1f1dSLionel Sambuc </xsl:template> 502*0a6a1f1dSLionel Sambuc 503*0a6a1f1dSLionel Sambuc <xsl:template match="skipped" mode="details"> 504*0a6a1f1dSLionel Sambuc <p class="term"><strong>SKIPPED</strong>: <xsl:apply-templates /></p> 505*0a6a1f1dSLionel Sambuc </xsl:template> 506*0a6a1f1dSLionel Sambuc 507*0a6a1f1dSLionel Sambuc <xsl:template match="tc" mode="details"> 508*0a6a1f1dSLionel Sambuc <xsl:variable name="full-id" 509*0a6a1f1dSLionel Sambuc select="concat(translate(../@id, '/', '_'), '_', @id)" /> 510*0a6a1f1dSLionel Sambuc 511*0a6a1f1dSLionel Sambuc <a name="{$full-id}" /> 512*0a6a1f1dSLionel Sambuc <h2 id="{$full-id}">Test case: 513*0a6a1f1dSLionel Sambuc <xsl:value-of select="../@id" /><xsl:text>/</xsl:text> 514*0a6a1f1dSLionel Sambuc <xsl:value-of select="@id" /></h2> 515*0a6a1f1dSLionel Sambuc 516*0a6a1f1dSLionel Sambuc <xsl:if test="tc-time"> 517*0a6a1f1dSLionel Sambuc <p class="details">Duration: 518*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="tc-time" mode="details" /></p> 519*0a6a1f1dSLionel Sambuc </xsl:if> 520*0a6a1f1dSLionel Sambuc 521*0a6a1f1dSLionel Sambuc <h3>Termination reason</h3> 522*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="expected_death|expected_exit|expected_failure| 523*0a6a1f1dSLionel Sambuc expected_signal|expected_timeout| 524*0a6a1f1dSLionel Sambuc failed|skipped" 525*0a6a1f1dSLionel Sambuc mode="details" /> 526*0a6a1f1dSLionel Sambuc 527*0a6a1f1dSLionel Sambuc <xsl:if test="so"> 528*0a6a1f1dSLionel Sambuc <h3>Standard output stream</h3> 529*0a6a1f1dSLionel Sambuc <pre class="so"><xsl:apply-templates select="so" mode="details" /></pre> 530*0a6a1f1dSLionel Sambuc </xsl:if> 531*0a6a1f1dSLionel Sambuc 532*0a6a1f1dSLionel Sambuc <xsl:if test="se"> 533*0a6a1f1dSLionel Sambuc <h3>Standard error stream</h3> 534*0a6a1f1dSLionel Sambuc <pre class="se"><xsl:apply-templates select="se" mode="details" /></pre> 535*0a6a1f1dSLionel Sambuc </xsl:if> 536*0a6a1f1dSLionel Sambuc </xsl:template> 537*0a6a1f1dSLionel Sambuc 538*0a6a1f1dSLionel Sambuc <xsl:template match="tc-time" mode="details"> 539*0a6a1f1dSLionel Sambuc <xsl:apply-templates /> seconds 540*0a6a1f1dSLionel Sambuc </xsl:template> 541*0a6a1f1dSLionel Sambuc 542*0a6a1f1dSLionel Sambuc <xsl:template match="so" mode="details"> 543*0a6a1f1dSLionel Sambuc <xsl:apply-templates /> 544*0a6a1f1dSLionel Sambuc <xsl:if test="position() != last()"> 545*0a6a1f1dSLionel Sambuc <xsl:text> 546*0a6a1f1dSLionel Sambuc</xsl:text> 547*0a6a1f1dSLionel Sambuc </xsl:if> 548*0a6a1f1dSLionel Sambuc </xsl:template> 549*0a6a1f1dSLionel Sambuc 550*0a6a1f1dSLionel Sambuc <xsl:template match="se" mode="details"> 551*0a6a1f1dSLionel Sambuc <xsl:apply-templates /> 552*0a6a1f1dSLionel Sambuc <xsl:if test="position() != last()"> 553*0a6a1f1dSLionel Sambuc <xsl:text> 554*0a6a1f1dSLionel Sambuc</xsl:text> 555*0a6a1f1dSLionel Sambuc </xsl:if> 556*0a6a1f1dSLionel Sambuc </xsl:template> 557*0a6a1f1dSLionel Sambuc 558*0a6a1f1dSLionel Sambuc <xsl:template match="@*|node()" priority="-1"> 559*0a6a1f1dSLionel Sambuc <xsl:copy> 560*0a6a1f1dSLionel Sambuc <xsl:apply-templates select="@*|node()" /> 561*0a6a1f1dSLionel Sambuc </xsl:copy> 562*0a6a1f1dSLionel Sambuc </xsl:template> 563*0a6a1f1dSLionel Sambuc 564*0a6a1f1dSLionel Sambuc</xsl:stylesheet> 565