On Wed, Mar 19, 2014 at 06:32:34PM +0100, Pino Toscano wrote:
Read and use the classname attribute in each test if present, falling back to "TestSuite" (used so far). --- tests/run-xml-to-junit.xsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/run-xml-to-junit.xsl b/tests/run-xml-to-junit.xsl index b0d56f3..3bae981 100644 --- a/tests/run-xml-to-junit.xsl +++ b/tests/run-xml-to-junit.xsl @@ -15,8 +15,9 @@ <xsl:variable name="TestcaseName"><xsl:value-of select="@name"/></xsl:variable> <xsl:variable name="TestcaseTime"><xsl:value-of select="@time"/></xsl:variable> <xsl:variable name="TestcaseRescode"><xsl:value-of select="@rescode"/></xsl:variable> + <xsl:variable name="TestcaseClassname"><xsl:choose><xsl:when test="@classname"><xsl:value-of select="@classname"/></xsl:when><xsl:otherwise>TestSuite</xsl:otherwise></xsl:choose></xsl:variable> <xsl:variable name="TestcaseOutput"><xsl:value-of select="."/></xsl:variable> - <testcase name="{$TestcaseName}" classname="TestSuite" time="{$TestcaseTime}"> + <testcase name="{$TestcaseName}" classname="{$TestcaseClassname}" time="{$TestcaseTime}"> <xsl:choose> <xsl:when test="$TestcaseRescode = 0"> <system-out><xsl:value-of select="$TestcaseOutput"/></system-out>
ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top