Skip to content
Permalink
Browse files

Fix JENKINS-11542

  • Loading branch information...
gboissinot committed Oct 27, 2012
1 parent c9d2fd7 commit 1c41848a233fbbfb8dfca5d09738a226607e86f4
@@ -0,0 +1,131 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" indent="yes" />
<xsl:decimal-format decimal-separator="." grouping-separator="," />

<!-- misc variables -->
<xsl:variable name="classname" select="/TestCase/@name" />
<xsl:variable name="total-tests" select="count(/TestCase/TestFunction)" />
<xsl:variable name="total-failures" select="count(/TestCase/TestFunction/Incident[@type='fail'])" />

<!-- main template call -->
<xsl:template match="/">
<xsl:apply-templates select="TestCase"/>
</xsl:template>

<xsl:template match="TestCase">
<testsuite name="{$classname}" tests="{$total-tests}" failures="{$total-failures}" errors="0" time="0.0">
<xsl:apply-templates select="Environment"/>
<xsl:apply-templates select="TestFunction" />
<xsl:call-template name="display-system-out" />
<xsl:call-template name="display-system-err" />
</testsuite>
</xsl:template>

<xsl:template match="Environment">
<properties>
<xsl:for-each select="*">
<property name="{name()}" value="{text()}" />
</xsl:for-each>
</properties>
</xsl:template>

<xsl:template match="TestFunction">
<testcase classname="{$classname}" name="{@name}" time="0.0">

<!-- handle skip -->
<xsl:if test="Message/@type = 'skip'">
<!-- will be used to generate "nice" error message -->
<xsl:variable name="file" select="Message[@type='skip']/@file" />
<xsl:variable name="line" select="Message[@type='skip']/@line" />
<xsl:variable name="description">
<xsl:value-of select="Message[@type='skip']/Description" />
</xsl:variable>

<!-- display a reasonable skipped message -->
<xsl:element name="skipped">
<xsl:value-of select="concat($file,':',$line,' :: ',$description)" />
</xsl:element>
</xsl:if>

<!-- handle fail -->
<xsl:if test="Incident/@type = 'fail'">
<!-- will be used to generate "nice" error message -->
<xsl:variable name="file" select="Incident[@type='fail']/@file" />
<xsl:variable name="line" select="Incident[@type='fail']/@line" />
<xsl:variable name="description">
<xsl:value-of select="Incident[@type='fail']/Description" />
</xsl:variable>

<!-- display a reasonable error message -->
<xsl:element name="failure">
<xsl:attribute name="type">failure</xsl:attribute>
<xsl:attribute name="message">
<xsl:value-of select="concat($file,':',$line,' :: ',$description)" />
</xsl:attribute>
</xsl:element>
</xsl:if>

<!-- handle xfail -->
<xsl:if test="Incident/@type = 'xfail'">
<system-out>
<xsl:for-each select="Incident[@type='xfail']">
<!-- will be used to generate "nice" error message -->
<xsl:variable name="file" select="@file" />
<xsl:variable name="line" select="@line" />
<xsl:variable name="description">
<xsl:value-of select="Description" />
</xsl:variable>

<!-- display a reasonable error message -->
<xsl:text>&#10;</xsl:text>
<xsl:text disable-output-escaping="yes">&lt;![CDATA[XFAIL : </xsl:text>
<xsl:value-of select="concat($file,':',$line,' :: ',$description)" disable-output-escaping="yes"/>
<xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
</xsl:for-each>
</system-out>
</xsl:if>

<!-- handle pass -->
<xsl:if test="Incident/@type = 'pass'">
<xsl:if test="Message[@type='qdebug'] | Message[@type='qwarn'] | Message[@type='warn']">
<system-err>
<xsl:for-each select="Message[@type='qdebug'] | Message[@type='qwarn'] | Message[@type='warn']">
<xsl:choose>
<xsl:when test="@type='qdebug'">
<xsl:text>&#10;</xsl:text>
<xsl:text disable-output-escaping="yes">&lt;![CDATA[QDEBUG : </xsl:text>
<xsl:value-of select="Description" disable-output-escaping="yes"/>
<xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
</xsl:when>
<xsl:when test="@type='qwarn'">
<xsl:text>&#10;</xsl:text>
<xsl:text disable-output-escaping="yes">&lt;![CDATA[QWARN : </xsl:text>
<xsl:value-of select="Description" disable-output-escaping="yes"/>
<xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
</xsl:when>
<xsl:when test="@type='warn'">
<xsl:text>&#10;</xsl:text>
<xsl:text disable-output-escaping="yes">&lt;![CDATA[WARNING : </xsl:text>
<xsl:value-of select="Description" disable-output-escaping="yes"/>
<xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</system-err>
</xsl:if>
</xsl:if>

</testcase>

</xsl:template>

<xsl:template name="display-system-out">
<system-out/>
</xsl:template>

<xsl:template name="display-system-err">
<system-err/>
</xsl:template>

</xsl:stylesheet>
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="tst_QString" tests="118" failures="0" errors="0" time="0.0">
<properties>
<property name="QtVersion" value="5.0.0"/>
<property name="QTestVersion" value="5.0.0"/>
</properties>
<testcase classname="tst_QString" name="initTestCase" time="0.0"/>
<testcase classname="tst_QString" name="fromStdString" time="0.0"/>
<testcase classname="tst_QString" name="toStdString" time="0.0"/>
<testcase classname="tst_QString" name="check_QTextIOStream" time="0.0"/>
<testcase classname="tst_QString" name="check_QTextStream" time="0.0"/>
<testcase classname="tst_QString" name="check_QDataStream" time="0.0"/>
<testcase classname="tst_QString" name="fromRawData" time="0.0"/>
<testcase classname="tst_QString" name="setRawData" time="0.0"/>
<testcase classname="tst_QString" name="endsWith" time="0.0"/>
<testcase classname="tst_QString" name="startsWith" time="0.0"/>
<testcase classname="tst_QString" name="setNum" time="0.0"/>
<testcase classname="tst_QString" name="toDouble" time="0.0"/>
<testcase classname="tst_QString" name="toFloat" time="0.0"/>
<testcase classname="tst_QString" name="toLong" time="0.0"/>
<testcase classname="tst_QString" name="toULong" time="0.0"/>
<testcase classname="tst_QString" name="toLongLong" time="0.0"/>
<testcase classname="tst_QString" name="toULongLong" time="0.0"/>
<testcase classname="tst_QString" name="toUInt" time="0.0"/>
<testcase classname="tst_QString" name="toInt" time="0.0"/>
<testcase classname="tst_QString" name="toShort" time="0.0"/>
<testcase classname="tst_QString" name="toUShort" time="0.0"/>
<testcase classname="tst_QString" name="replace_qchar_qchar" time="0.0"/>
<testcase classname="tst_QString" name="replace_qchar_qstring" time="0.0"/>
<testcase classname="tst_QString" name="replace_uint_uint" time="0.0"/>
<testcase classname="tst_QString" name="replace_uint_uint_extra" time="0.0"/>
<testcase classname="tst_QString" name="replace_string" time="0.0"/>
<testcase classname="tst_QString" name="replace_regexp" time="0.0"/>
<testcase classname="tst_QString" name="remove_uint_uint" time="0.0"/>
<testcase classname="tst_QString" name="remove_string" time="0.0"/>
<testcase classname="tst_QString" name="remove_regexp" time="0.0"/>
<testcase classname="tst_QString" name="swap" time="0.0"/>
<testcase classname="tst_QString" name="prepend" time="0.0"/>
<testcase classname="tst_QString" name="prepend_bytearray" time="0.0"/>
<testcase classname="tst_QString" name="append" time="0.0"/>
<testcase classname="tst_QString" name="append_bytearray" time="0.0"/>
<testcase classname="tst_QString" name="operator_pluseq_bytearray" time="0.0"/>
<testcase classname="tst_QString" name="operator_eqeq_bytearray" time="0.0"/>
<testcase classname="tst_QString" name="operator_eqeq_nullstring" time="0.0"/>
<testcase classname="tst_QString" name="operator_smaller" time="0.0"/>
<testcase classname="tst_QString" name="insert" time="0.0"/>
<testcase classname="tst_QString" name="simplified" time="0.0"/>
<testcase classname="tst_QString" name="trimmed" time="0.0"/>
<testcase classname="tst_QString" name="toUpper" time="0.0">
<system-out>
<![CDATA[XFAIL : tst_qstring.cpp:1807 :: test doesn't work with ICU support, since QChar is unaware of any locale]]></system-out>
</testcase>
<testcase classname="tst_QString" name="toLower" time="0.0">
<system-out>
<![CDATA[XFAIL : tst_qstring.cpp:1866 :: test doesn't work with ICU support, since QChar is unaware of any locale]]></system-out>
</testcase>
<testcase classname="tst_QString" name="toCaseFolded" time="0.0"/>
<testcase classname="tst_QString" name="rightJustified" time="0.0"/>
<testcase classname="tst_QString" name="leftJustified" time="0.0"/>
<testcase classname="tst_QString" name="mid" time="0.0"/>
<testcase classname="tst_QString" name="right" time="0.0"/>
<testcase classname="tst_QString" name="left" time="0.0"/>
<testcase classname="tst_QString" name="midRef" time="0.0"/>
<testcase classname="tst_QString" name="rightRef" time="0.0"/>
<testcase classname="tst_QString" name="leftRef" time="0.0"/>
<testcase classname="tst_QString" name="stringRef" time="0.0"/>
<testcase classname="tst_QString" name="contains" time="0.0"/>
<testcase classname="tst_QString" name="count" time="0.0"/>
<testcase classname="tst_QString" name="lastIndexOf" time="0.0"/>
<testcase classname="tst_QString" name="indexOf" time="0.0">
<system-out>
<![CDATA[XFAIL : tst_qstring.cpp:1167 :: QRegularExpression does not support case folding]]>
<![CDATA[XFAIL : tst_qstring.cpp:1167 :: QRegularExpression does not support case folding]]></system-out>
</testcase>
<testcase classname="tst_QString" name="indexOf2" time="0.0"/>
<testcase classname="tst_QString" name="sprintf" time="0.0"/>
<testcase classname="tst_QString" name="fill" time="0.0"/>
<testcase classname="tst_QString" name="truncate" time="0.0"/>
<testcase classname="tst_QString" name="constructor" time="0.0"/>
<testcase classname="tst_QString" name="constructorQByteArray" time="0.0"/>
<testcase classname="tst_QString" name="STL" time="0.0"/>
<testcase classname="tst_QString" name="isEmpty" time="0.0"/>
<testcase classname="tst_QString" name="isNull" time="0.0"/>
<testcase classname="tst_QString" name="acc_01" time="0.0"/>
<testcase classname="tst_QString" name="length" time="0.0"/>
<testcase classname="tst_QString" name="utf8" time="0.0"/>
<testcase classname="tst_QString" name="fromUtf8" time="0.0"/>
<testcase classname="tst_QString" name="nullFromUtf8" time="0.0"/>
<testcase classname="tst_QString" name="fromLocal8Bit" time="0.0"/>
<testcase classname="tst_QString" name="local8Bit" time="0.0"/>
<testcase classname="tst_QString" name="fromLatin1Roundtrip" time="0.0"/>
<testcase classname="tst_QString" name="toLatin1Roundtrip" time="0.0"/>
<testcase classname="tst_QString" name="stringRef_toLatin1Roundtrip" time="0.0"/>
<testcase classname="tst_QString" name="stringRef_utf8" time="0.0"/>
<testcase classname="tst_QString" name="stringRef_local8Bit" time="0.0"/>
<testcase classname="tst_QString" name="fromLatin1" time="0.0"/>
<testcase classname="tst_QString" name="fromAscii" time="0.0"/>
<testcase classname="tst_QString" name="arg" time="0.0">
<system-err>
<![CDATA[QWARN : QString::arg: Argument missing: "" , 0 ]]>
<![CDATA[QWARN : QString::arg: Argument missing: "" , 0 ]]>
<![CDATA[QWARN : QString::arg: Argument missing: " " , 0 ]]>
<![CDATA[QWARN : QString::arg: Argument missing: "%" , 0 ]]>
<![CDATA[QWARN : QString::arg: Argument missing: "%%" , 0 ]]>
<![CDATA[QWARN : QString::arg: Argument missing: "%%%" , 0 ]]></system-err>
</testcase>
<testcase classname="tst_QString" name="number" time="0.0"/>
<testcase classname="tst_QString" name="arg_fillChar" time="0.0"/>
<testcase classname="tst_QString" name="capacity" time="0.0"/>
<testcase classname="tst_QString" name="section" time="0.0"/>
<testcase classname="tst_QString" name="double_conversion" time="0.0"/>
<testcase classname="tst_QString" name="integer_conversion" time="0.0"/>
<testcase classname="tst_QString" name="tortureSprintfDouble" time="0.0"/>
<testcase classname="tst_QString" name="toNum" time="0.0"/>
<testcase classname="tst_QString" name="localeAwareCompare" time="0.0">
<system-out>
<![CDATA[XFAIL : tst_qstring.cpp:4615 :: ICU disagrees with test]]></system-out>
</testcase>
<testcase classname="tst_QString" name="split" time="0.0"/>
<testcase classname="tst_QString" name="split_regexp" time="0.0"/>
<testcase classname="tst_QString" name="fromUtf16" time="0.0"/>
<testcase classname="tst_QString" name="latin1String" time="0.0"/>
<testcase classname="tst_QString" name="nanAndInf" time="0.0"/>
<testcase classname="tst_QString" name="compare" time="0.0"/>
<testcase classname="tst_QString" name="resizeAfterFromRawData" time="0.0"/>
<testcase classname="tst_QString" name="resizeAfterReserve" time="0.0"/>
<testcase classname="tst_QString" name="resizeWithNegative" time="0.0"/>
<testcase classname="tst_QString" name="truncateWithNegative" time="0.0"/>
<testcase classname="tst_QString" name="QCharRefMutableUnicode" time="0.0"/>
<testcase classname="tst_QString" name="QCharRefDetaching" time="0.0"/>
<testcase classname="tst_QString" name="sprintfZU" time="0.0"/>
<testcase classname="tst_QString" name="repeatedSignature" time="0.0"/>
<testcase classname="tst_QString" name="repeated" time="0.0"/>
<testcase classname="tst_QString" name="compareRef" time="0.0"/>
<testcase classname="tst_QString" name="arg_locale" time="0.0"/>
<testcase classname="tst_QString" name="toUpperLower_icu" time="0.0"/>
<testcase classname="tst_QString" name="eightBitLiterals" time="0.0"/>
<testcase classname="tst_QString" name="reserve" time="0.0"/>
<testcase classname="tst_QString" name="toHtmlEscaped" time="0.0"/>
<testcase classname="tst_QString" name="operatorGreaterWithQLatin1String" time="0.0"/>
<testcase classname="tst_QString" name="compareQLatin1Strings" time="0.0"/>
<testcase classname="tst_QString" name="fromQLatin1StringWithLength" time="0.0"/>
<testcase classname="tst_QString" name="assignQLatin1String" time="0.0"/>
<testcase classname="tst_QString" name="isRightToLeft" time="0.0"/>
<testcase classname="tst_QString" name="cleanupTestCase" time="0.0"/>
<system-out/>
<system-err/>
</testsuite>

0 comments on commit 1c41848

Please sign in to comment.
You can’t perform that action at this time.