mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gary_williams
10.45.2007 8c2c30e4b8beadee406e139493d402f2c3652ae3
Fix Issue 1232 divide by zero error in test report stylesheet 
1 files modified
12 ■■■■■ changed files
opends/tests/functional-tests/shared/xsl/gen-alltests-report.xsl 12 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/xsl/gen-alltests-report.xsl
@@ -41,7 +41,17 @@
  <xsl:variable name="fail-tests"   select="count($testcase[@result='fail'])"/>
  <xsl:variable name="inconc-tests" select="count($testcase[@result='unknown'])"/>
  <xsl:variable name="percent-tests" select="round((($pass-tests div $total-tests) * 100) - 0.5)"/>
  <!-- Overall Test Percentage -->
  <xsl:variable name="percent-tests">
    <xsl:choose>
      <xsl:when test="$total-tests &gt; 0">
        <xsl:value-of select="round((($pass-tests div $total-tests) * 100) - 0.5)"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="0"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>
  <!-- Shaded Line -->
  <xsl:element name="hr">