diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-12-27 03:01:59 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-12-27 03:01:59 -0800 |
commit | 0b8eed127707df9ffab416f351f45d4eb0c596e8 (patch) | |
tree | 3b7ace90499861f5343b575aa66dcbccf3f71226 /tools | |
parent | 2e51bdb4d41f88f67ac9ad58d0fcfc715c37c4e2 (diff) | |
download | DotNetOpenAuth-0b8eed127707df9ffab416f351f45d4eb0c596e8.zip DotNetOpenAuth-0b8eed127707df9ffab416f351f45d4eb0c596e8.tar.gz DotNetOpenAuth-0b8eed127707df9ffab416f351f45d4eb0c596e8.tar.bz2 |
Applied fixes from StackOverflow.
http://stackoverflow.com/questions/1895304/how-do-i-include-full-partcover-results-with-teamcity-5
Diffstat (limited to 'tools')
-rw-r--r-- | tools/PartCover/xslt/Report By Assembly.xslt | 3 | ||||
-rw-r--r-- | tools/PartCover/xslt/Report By Class.xslt | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/tools/PartCover/xslt/Report By Assembly.xslt b/tools/PartCover/xslt/Report By Assembly.xslt index 9309e4e..99d3c67 100644 --- a/tools/PartCover/xslt/Report By Assembly.xslt +++ b/tools/PartCover/xslt/Report By Assembly.xslt @@ -68,4 +68,5 @@ </tr> </xsl:for-each> </table> - </xsl:template>
\ No newline at end of file + </xsl:template> +</xsl:stylesheet>
\ No newline at end of file diff --git a/tools/PartCover/xslt/Report By Class.xslt b/tools/PartCover/xslt/Report By Class.xslt index 3aa87ae..caffbfc 100644 --- a/tools/PartCover/xslt/Report By Class.xslt +++ b/tools/PartCover/xslt/Report By Class.xslt @@ -16,7 +16,7 @@ <td colspan="2">Coverage by class</td> </tr> - <xsl:for-each select="/PartCoverReport[@version='4.0']/Type"> + <xsl:for-each select="/PartCoverReport/Type"> <tr> <xsl:element name="td"> @@ -24,8 +24,8 @@ <xsl:value-of select="@name"/> </xsl:element> - <xsl:variable name="codeSize" select="sum(./Method/pt/@len)+sum(./Method[count(pt)=0]/@bodysize)"/> - <xsl:variable name="coveredCodeSize" select="sum(./Method/pt[@visit>0]/@len)"/> + <xsl:variable name="codeSize" select="sum(./Method/pt/@len)+0"/> + <xsl:variable name="coveredCodeSize" select="sum(./Method/pt[@visit>0]/@len)+0"/> <xsl:element name="td"> <xsl:if test="$codeSize=0"> @@ -36,7 +36,7 @@ </xsl:if> <xsl:if test="$codeSize > 0"> - <xsl:variable name="coverage" select="round(100 * $coveredCodeSize div $codeSize)"/> + <xsl:variable name="coverage" select="ceiling(100 * $coveredCodeSize div $codeSize)"/> <xsl:if test="$coverage >= 0 and $coverage < 20"> <xsl:attribute name="style"> @@ -70,7 +70,5 @@ </tr> </xsl:for-each> </table> - </xsl:template> - -</xsl:stylesheet> +</xsl:stylesheet>
\ No newline at end of file |