Skip to content

Commit

Permalink
CMake: Add support for skipped/errored tests in ctest-to-junit.xsl
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Feb 11, 2020
1 parent 191b6b6 commit 2334558
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmake/ctest-to-junit.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ MIT License.
It was taken from this GitHub repositiory:
https://github.com/rpavlik/jenkins-ctest-plugin
Includes modifications by Jan Holthuis to add support for skipped/errored
tests.
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
Expand All @@ -27,11 +30,19 @@ It was taken from this GitHub repositiory:
<testcase classname="projectroot{$className}"
name="{$testName}"
time="{$duration}">
<xsl:if test="@Status!='passed'">
<xsl:if test="@Status='failed'">
<failure>
<xsl:value-of select="$output" />
</failure>
</xsl:if>
<xsl:if test="@Status='errored'">
<error>
<xsl:value-of select="$output" />
</error>
</xsl:if>
<xsl:if test="@Status='notrun'">
<skipped />
</xsl:if>
<system-out>
<xsl:value-of select="$output" />
</system-out>
Expand Down

0 comments on commit 2334558

Please sign in to comment.