Commit 369e47d1 authored by Erwan Croze's avatar Erwan Croze 👋🏻

Fix bcunit-to-junit.xsl

parent 4c7216d7
...@@ -2,25 +2,25 @@ ...@@ -2,25 +2,25 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" /> <xsl:output method="xml" indent="yes" />
<xsl:template match="/"> <xsl:template match="/">
<testsuites> <testsuites>
<xsl:for-each select="//BCUNIT_RUN_SUITE_SUCCESS"> <xsl:for-each select="//BCUNIT_RUN_SUITE_SUCCESS">
<xsl:variable name="suiteName" select="normalize-space(SUITE_NAME/text())"/> <xsl:variable name="suiteName" select="normalize-space(SUITE_NAME/text())"/>
<xsl:variable name="numberOfTests" select="count(BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_SUCCESS)"/> <xsl:variable name="numberOfTests" select="count(BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_SUCCESS)"/>
<xsl:variable name="numberOfFailures" select="count(BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_FAILURE)"/> <xsl:variable name="numberOfFailures" select="count(BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_FAILURE)"/>
<testsuite <testsuite
name="{$suiteName}" name="{$suiteName}"
tests="{$numberOfTests}" tests="{$numberOfTests}"
time="0" time="0"
failures="{$numberOfFailures}" failures="{$numberOfFailures}"
errors="0" errors="0"
skipped="0"> skipped="0">
<xsl:for-each select="BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_SUCCESS"> <xsl:for-each select="BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_SUCCESS">
<xsl:variable name="testname" select="normalize-space(TEST_NAME/text())"></xsl:variable> <xsl:variable name="testname" select="normalize-space(TEST_NAME/text())"></xsl:variable>
<testcase classname="{$suiteName}" name="{$testname}" time="0.0"> <testcase classname="{$suiteName}" name="{$testname}" time="0.0">
</testcase> </testcase>
</xsl:for-each> </xsl:for-each>
<xsl:for-each select="BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_FAILURE"> <xsl:for-each select="BCUNIT_RUN_TEST_RECORD/BCUNIT_RUN_TEST_FAILURE">
<xsl:variable name="testname" select="normalize-space(TEST_NAME/text())"></xsl:variable> <xsl:variable name="testname" select="normalize-space(TEST_NAME/text())"></xsl:variable>
<testcase classname="{$suiteName}" name="{$testname}" time="0.0"> <testcase classname="{$suiteName}" name="{$testname}" time="0.0">
...@@ -29,11 +29,8 @@ Test failed at line <xsl:value-of select="LINE_NUMBER"></xsl:value-of> in file < ...@@ -29,11 +29,8 @@ Test failed at line <xsl:value-of select="LINE_NUMBER"></xsl:value-of> in file <
</failure> </failure>
</testcase> </testcase>
</xsl:for-each> </xsl:for-each>
</testsuite>
</xsl:for-each>
</testsuite> </testsuites>
</xsl:for-each>
</testsuites>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment