[Pkg-libvirt-commits] [libguestfs] 13/26: tests/run-xml-to-junit.xsl: allow to define a different classname

Hilko Bengen bengen at moszumanska.debian.org
Thu Mar 20 23:06:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.25.46
in repository libguestfs.

commit 121c2894bc4d089142acb1652f30913b36807895
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Wed Mar 19 18:30:58 2014 +0100

    tests/run-xml-to-junit.xsl: allow to define a different classname
    
    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>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list