Please note:The SCons wiki is now restored from the attack in March 2013. All old passwords have been invalidated. Please reset your password if you have an account. If you note missing pages, please report them to webmaster@scons.org. Also, new account creation is currently disabled due to an ongoing spam flood (2013/08/27).

Attachment 'coverage.xsl'

Download

   1 <?xml version="1.0" encoding="utf-8"?>
   2 <xsl:stylesheet version="1.0"
   3     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   4   <xsl:param name="low_coverage" select="60"/>
   5   <xsl:param name="ok_coverage" select="30"/>
   6 <xsl:template match="/">
   7     <html>
   8     <body>
   9       <h1>This is the coverage report</h1>
  10       <h2> Assembly coverage</h2>
  11       <table style="width:640;border:2px solid black;">
  12           <tr>
  13             <td style="font-weight:bold">Assembly</td>
  14             <td style="text-align:right;font-weight:bold">Blocks not covered</td>
  15             <td style="text-align:right;font-weight:bold">% blocks not covered</td>
  16           </tr>
  17         <xsl:for-each select="//Module">
  18           <tr>
  19             <td>
  20               <xsl:value-of select="ModuleName"/>
  21             </td>
  22             <td style="text-align:right">
  23               <xsl:value-of select="BlocksNotCovered"/>
  24               of
  25               <xsl:value-of select="(BlocksCovered+BlocksNotCovered)"/>
  26             </td>
  27             <td>
  28               <xsl:variable name="pct" select="(BlocksNotCovered div (BlocksNotCovered + BlocksCovered))*100"/>
  29               <xsl:attribute name="style">
  30                 text-align:right;
  31                 <xsl:choose>
  32                   <xsl:when test="number($pct &gt;= $low_coverage)">background-color:red;</xsl:when>
  33                   <xsl:when test="number($pct &gt;= $ok_coverage)">background-color:yellow;</xsl:when>
  34                   <xsl:otherwise>background-color:green;</xsl:otherwise>
  35                 </xsl:choose>
  36               </xsl:attribute>
  37               <xsl:value-of select="$pct"/>
  38             </td>
  39           </tr>
  40         </xsl:for-each>
  41         </table>
  42     </body>
  43     </html>
  44 </xsl:template>
  45 </xsl:stylesheet>

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.

You are not allowed to attach a file to this page.