5445N/A<?xml version="1.0" encoding="UTF-8"?>
5445N/A<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5445N/A<!--
5445N/A ! CDDL HEADER START
5445N/A !
5445N/A ! The contents of this file are subject to the terms of the
5445N/A ! Common Development and Distribution License, Version 1.0 only
5445N/A ! (the "License"). You may not use this file except in compliance
5445N/A ! with the License.
6982N/A !
6982N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
5445N/A ! or http://forgerock.org/license/CDDLv1.0.html.
5445N/A ! See the License for the specific language governing permissions
5445N/A ! and limitations under the License.
6982N/A !
5445N/A ! When distributing Covered Code, include this CDDL HEADER in each
6982N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A ! If applicable, add the following below this CDDL HEADER, with the
6982N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6982N/A ! information:
5445N/A ! Portions Copyright [yyyy] [name of copyright owner]
5445N/A !
5445N/A ! CDDL HEADER END
5445N/A !
6142N/A ! Copyright 2011-2013 ForgeRock AS.
5445N/A ! -->
5445N/A
5445N/A<xsl:output method="xml" indent="yes" />
5445N/A<xsl:template match="/">
5445N/A<testsuites>
5445N/A <xsl:variable name="ftpath" select="/qa/functional-tests"/>
5445N/A <xsl:variable name="id" select="$ftpath/identification"/>
5445N/A <xsl:variable name="results" select="$ftpath/results"/>
5445N/A <xsl:variable name="testgroup" select="$results/testgroup"/>
5445N/A <xsl:variable name="testsuite" select="$testgroup/testsuite"/>
5445N/A <xsl:variable name="testcase" select="$testsuite/testcase"/>
5445N/A <xsl:variable name="total-tests" select="count($testcase)"/>
5445N/A <xsl:variable name="pass-tests" select="count($testcase[@result='pass'])"/>
5445N/A <xsl:variable name="kfail-tests" select="count($testcase/issues)"/>
5445N/A <xsl:variable name="inconc-tests" select="count($testcase[@result='unknown'])"/>
6142N/A <xsl:variable name="fail-tests" select="count($testcase[@result='fail']) - $kfail-tests"/>
5446N/A <testsuite name="opendj.tests.functional"
6142N/A time="0"
6142N/A tests="{$total-tests}"
6142N/A errors="{$inconc-tests}"
6142N/A failures="{$fail-tests}"
6142N/A skipped="{$kfail-tests}">
6142N/A
5446N/A <xsl:for-each select="$testcase">
6142N/A <xsl:variable name="issue">
6142N/A <xsl:value-of select="issues/issue/@id"/>
6142N/A </xsl:variable>
5445N/A <xsl:variable name="message" select="'no message'"/>
6142N/A <testcase classname="{ancestor::testgroup[1]/@name}.{ancestor::testsuite[1]/@shortname}"
6142N/A name="{@shortname}"
6142N/A time="{@duration}">
6142N/A <xsl:if test="contains(@result, 'unknown')">
6142N/A <error>
6142N/A <xsl:value-of select="'log inconclusive'"/>
6142N/A </error>
6142N/A </xsl:if>
6142N/A <xsl:if test="contains(@result, 'fail') and string-length($issue) = 0">
6142N/A <failure>
6142N/A <xsl:value-of select="'log fail'"/>
6142N/A </failure>
6142N/A </xsl:if>
6142N/A <xsl:if test="contains(@result, 'fail') and string-length($issue) &gt; 0">
6142N/A <skipped>
6142N/A <xsl:value-of select="$issue"/>
6142N/A </skipped>
6142N/A </xsl:if>
6142N/A </testcase>
5445N/A </xsl:for-each>
5445N/A
5445N/A </testsuite>
5445N/A</testsuites>
5445N/A</xsl:template>
5445N/A</xsl:stylesheet>
5445N/A