Forgot more files...
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:variable name="hrefnode" select="/cruisecontrol/build/buildresults//task[@name='fit']/message[starts-with(text(), 'results')]"/>
|
||||
<xsl:variable name="resultsnode" select="/cruisecontrol/build/buildresults//task[@name='fit']/message[contains(text(), 'fixtures run')]"/>
|
||||
<xsl:variable name="ahref" select="substring-after($hrefnode, ':')"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:if test="count($hrefnode) > 0">
|
||||
<table cellpadding="2" cellspacing="0" border="0" width="98%">
|
||||
<tr>
|
||||
<td class="sectionheader" colspan="2">
|
||||
Acceptance Tests: <xsl:value-of select="$resultsnode"/>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="{$ahref}">test results</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,409 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="html" />
|
||||
<xsl:param name="applicationPath" select="'.'" />
|
||||
|
||||
<xsl:variable name="fxcop.root" select="//FxCopReport" />
|
||||
|
||||
<xsl:template match="/">
|
||||
<div id="fxcop-report">
|
||||
<script language="javascript">
|
||||
function toggle (name, img)
|
||||
{
|
||||
var element = document.getElementById (name);
|
||||
|
||||
if (element.style.display == 'none')
|
||||
element.style.display = '';
|
||||
else
|
||||
element.style.display = 'none';
|
||||
|
||||
var img_element = document.getElementById (img);
|
||||
|
||||
if (img_element.src.indexOf ('minus.png') > 0)
|
||||
img_element.src = '<xsl:value-of select="$applicationPath" />/images/plus.png';
|
||||
else
|
||||
img_element.src = '<xsl:value-of select="$applicationPath" />/images/minus.png';
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
#fxcop-report
|
||||
{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#fxcop-report .header
|
||||
{
|
||||
background-color: #566077;
|
||||
background-repeat: repeat-x;
|
||||
color: #fff;
|
||||
font-weight: bolder;
|
||||
height: 50px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#fxcop-report .headertext
|
||||
{
|
||||
height: 35px;
|
||||
margin-left: 15px;
|
||||
padding-top: 15px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#fxcop-report .wrapper
|
||||
{
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#fxcop-report .legend
|
||||
{
|
||||
background-color: #ffc;
|
||||
border: #d7ce28 1px solid;
|
||||
font-size: small;
|
||||
margin-top: 15px;
|
||||
padding: 5px;
|
||||
vertical-align: middle;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
#fxcop-report .clickablerow
|
||||
{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#fxcop-report .tabletotal
|
||||
{
|
||||
border-top: 1px #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#fxcop-report .results-table
|
||||
{
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
margin-top: 20px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#fxcop-report .results-table th
|
||||
{
|
||||
background: #b9c9fe;
|
||||
border-bottom: 1px solid #fff;
|
||||
border-top: 4px solid #aabcfe;
|
||||
color: #039;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#fxcop-report .results-table td
|
||||
{
|
||||
background: #e8edff;
|
||||
border-bottom: 1px solid #fff;
|
||||
border-top: 1px solid transparent;
|
||||
color: #669;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#fxcop-report .errorlist td
|
||||
{
|
||||
background: #FFF;
|
||||
border-bottom: 0;
|
||||
border-top: 0 solid transparent;
|
||||
color: #000;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#fxcop-report .inner-results
|
||||
{
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 4px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#fxcop-report .inner-results td
|
||||
{
|
||||
background: #FFF;
|
||||
border-bottom: 1px solid #fff;
|
||||
border-top: 1px solid transparent;
|
||||
color: #669;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#fxcop-report .inner-header th
|
||||
{
|
||||
background: #b9c9fe;
|
||||
color: #039;
|
||||
}
|
||||
|
||||
#fxcop-report .inner-rule-description
|
||||
{
|
||||
background-color: transparent;
|
||||
border-collapse: collapse;
|
||||
border: 0px;
|
||||
font-size: 12px;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 4px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#fxcop-report .inner-rule-description tr
|
||||
{
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
#fxcop-report .inner-rule-description td
|
||||
{
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
}
|
||||
</style>
|
||||
<xsl:apply-templates select="$fxcop.root" />
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="FxCopReport">
|
||||
<div class="header">
|
||||
<div class="headertext">
|
||||
FxCop <xsl:value-of select="@Version"/>: <xsl:value-of select="Localized/String[@Key='ReportTitle']/text()" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="legend">
|
||||
<div>
|
||||
Assemblies checked: <xsl:value-of select="count(Targets/Target/Modules/Module)" /><br />
|
||||
Warnings: <xsl:value-of select="count(//Message/Issue[@Level='Warning'])" /><br />
|
||||
Critical Warnings: <xsl:value-of select="count(//Message/Issue[@Level='CriticalWarning'])" /><br />
|
||||
Errors: <xsl:value-of select="count(//Message/Issue[@Level='Error'])"/><br />
|
||||
Critical Errors: <xsl:value-of select="count(//Message/Issue[@Level='CriticalError'])"/><br />
|
||||
Total Messages: <xsl:value-of select="count(//Message)"/><br />
|
||||
</div>
|
||||
</div>
|
||||
<table class='results-table'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope='col'></th>
|
||||
<th scope='col'></th>
|
||||
<th scope='col'>Assembly</th>
|
||||
<th scope='col'>Types</th>
|
||||
<th scope='col'>Warnings</th>
|
||||
<th scope='col'>Errors</th>
|
||||
<th scope='col'>Total Messages</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="Targets/Target/Modules/Module">
|
||||
<xsl:call-template name="print-module" />
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="print-module">
|
||||
<xsl:variable name="module.id" select="generate-id()" />
|
||||
|
||||
<tr class="clickablerow" onclick="toggle('{$module.id}', 'img-{$module.id}')">
|
||||
<td style="width: 10px">
|
||||
<img id="img-{$module.id}" src="{$applicationPath}/images/plus.png" />
|
||||
</td>
|
||||
<td style="width: 16px">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(.//Message[Issue/@Level='Error' or Issue/@Level='CriticalError']) > 0">
|
||||
<img src="{$applicationPath}/images/error.png" />
|
||||
</xsl:when>
|
||||
<xsl:when test="count(.//Message[Issue/@Level='Warning' or Issue/@Level='CriticalWarning']) > 0">
|
||||
<img src="{$applicationPath}/images/warning.png" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<img src="{$applicationPath}/images/ok.png" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="@Name" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="count(.//Types/Type)" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="count(.//Message[Issue/@Level='Warning' or Issue/@Level='CriticalWarning'])" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="count(.//Message[Issue/@Level='Error' or Issue/@Level='CriticalError'])"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="count(.//Message)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<xsl:call-template name="print-module-error-list">
|
||||
<xsl:with-param name="module.id" select="$module.id"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="print-module-error-list">
|
||||
<xsl:param name="module.id" />
|
||||
|
||||
<tr id="{$module.id}" class="errorlist" style="display: none">
|
||||
<td></td>
|
||||
<td colspan="6">
|
||||
<table cellpadding="2" cellspacing="0" width="100%" class="inner-results">
|
||||
<thead>
|
||||
<tr class="inner-header">
|
||||
<th scope='col'></th>
|
||||
<th scope='col'></th>
|
||||
<th scope='col'>Location</th>
|
||||
<th scope='col'>Fix Category</th>
|
||||
<th scope='col'>Certainty</th>
|
||||
<th scope='col'>Rule</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select=".//Messages/Message">
|
||||
<xsl:variable name="message.id" select="generate-id()" />
|
||||
<xsl:variable name="rule.check.id" select="@CheckId" />
|
||||
<xsl:variable name="rule.name" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/Name" />
|
||||
<xsl:variable name="rule.category" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/@Category" />
|
||||
<xsl:variable name="rule.description" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/Description" />
|
||||
<xsl:variable name="rule.url" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/Url" />
|
||||
<xsl:variable name="rule.file.name" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/File/@Name" />
|
||||
<xsl:variable name="rule.file.version" select="$fxcop.root/Rules/Rule[@CheckId = $rule.check.id]/File/@Version" />
|
||||
|
||||
<tr class="clickablerow" onclick="toggle('{$module.id}-{$message.id}', 'img-{$module.id}-{$message.id}')">
|
||||
<td style="width: 10px">
|
||||
<img id="img-{$module.id}-{$message.id}" src="{$applicationPath}/images/plus.png" />
|
||||
</td>
|
||||
<td style="width: 16px">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./Issue/@Level = 'Warning'">
|
||||
<img src="{$applicationPath}/images/warning.png">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="./Issue/@Level" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</xsl:when>
|
||||
<xsl:when test="./Issue/@Level = 'Error' or 'CriticalError'">
|
||||
<img src="{$applicationPath}/images/error.png">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="./Issue/@Level" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<img src="{$applicationPath}/images/ok.png">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="./Issue/@Level" />
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="../../../../@Name" /> - <xsl:value-of select="../../@Name" />
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="@FixCategory" />
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<xsl:value-of select="./Issue/@Certainty" /> %
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="$rule.name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="{$module.id}-{$message.id}" style="display: none">
|
||||
<td></td>
|
||||
<td colspan="5">
|
||||
<div class="legend">
|
||||
<div>
|
||||
<table cellpadding="2" cellspacing="0" width="100%" class="inner-rule-description">
|
||||
<tr>
|
||||
<td>
|
||||
<b>Rule:</b>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="$rule.name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Check Id:</b>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="$rule.check.id" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Category:</b>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="$rule.category" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Description:</b>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="$rule.description" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Found at:</b>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:if test="./Issue/@Path">
|
||||
<xsl:value-of select="./Issue/@Path" />\<xsl:value-of select="./Issue/@File" /> at line <xsl:value-of select="./Issue/@Line" />
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Resolution:</b>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="./Issue" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Help Link:</b>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{$rule.url}" target="_blank">
|
||||
<xsl:value-of select="$rule.url" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Rule File:</b>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="$rule.file.name" /> Version: <xsl:value-of select="$rule.file.version" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
|
||||
<xsl:variable name="report.root" select="cruisecontrol//FxCopReport" />
|
||||
|
||||
<xsl:if test="count($report.root/Targets/Target) + count($report.root/Exceptions/Exception) > 0" >
|
||||
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
|
||||
<tr>
|
||||
<td class="sectionheader" colspan="2">
|
||||
FxCop Messages: <xsl:value-of select="count($report.root//Message)"/>, Warning Messages: <xsl:value-of select="count($report.root//Message[Issue/@Level='Warning' or Issue/@Level='CriticalWarning'])"/>, Error Messages: <xsl:value-of select="count($report.root//Message[Issue/@Level='Error' or Issue/@Level='CriticalError'])"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
<xsl:apply-templates select="$report.root/Exceptions/Exception" />
|
||||
<xsl:apply-templates select="$report.root/Targets/Target/Modules/Module" />
|
||||
</table>
|
||||
</xsl:if>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Exception">
|
||||
<xsl:variable name="type" select="./Type" />
|
||||
<xsl:variable name="message" select="./ExceptionMessage" />
|
||||
|
||||
<tr><td class="section-error"><xsl:value-of select="concat ($type, ': ', $message)" /></td></tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="Module">
|
||||
<xsl:variable name="name" select="./@Name"/>
|
||||
<xsl:variable name="errors" select="count(.//Message[Issue/@Level='Error' or Issue/@Level='CriticalError'])"/>
|
||||
<xsl:variable name="warnings" select="count(.//Message[Issue/@Level='Warning' or Issue/@Level='CriticalWarning'])"/>
|
||||
|
||||
<tr><td colspan="2"><xsl:value-of select="concat ($name, ': ', $errors, ' Errors, ', $warnings, ' Warnings')" /></td></tr>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:variable name="modification.list" select="/cruisecontrol/modifications/modification"/>
|
||||
|
||||
<table class="section-table" cellpadding="2" cellspacing="0" border="0">
|
||||
|
||||
<xsl:if test="/cruisecontrol/exception">
|
||||
<tr><td class="header-title" colspan="2"><span style="font-size:160%;color:#600;font-weight:bold">BUILD EXCEPTION</span></td></tr>
|
||||
<tr>
|
||||
<td class="header-label" valign="top"><nobr>Error Message:</nobr></td>
|
||||
<td class="header-data-error"><xsl:value-of select="/cruisecontrol/exception"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="/cruisecontrol/build/@error">
|
||||
<tr><td class="header-title" colspan="2"><span style="font-size:150%;color:#600;font-weight:bold">BUILD FAILED</span></td></tr>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="not (/cruisecontrol/build/@error) and not (/cruisecontrol/exception)">
|
||||
<tr><td class="header-title" colspan="2"><span style="font-size:150%;color:#080;font-weight:bold">BUILD SUCCESSFUL</span></td></tr>
|
||||
</xsl:if>
|
||||
|
||||
<tr>
|
||||
<td class="header-label"><nobr>Project:</nobr></td>
|
||||
<td class="header-data"><xsl:value-of select="/cruisecontrol/@project"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label"><nobr>Date of build:</nobr></td>
|
||||
<td class="header-data"><xsl:value-of select="/cruisecontrol/build/@date"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label"><nobr>Running time:</nobr></td>
|
||||
<td class="header-data"><xsl:value-of select="/cruisecontrol/build/@buildtime"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="header-label"><nobr>Integration Request:</nobr></td>
|
||||
<td class="header-data">
|
||||
<xsl:value-of select="/cruisecontrol/request" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<xsl:if test="/cruisecontrol/integrationProperties/CCNetForceBuildReason">
|
||||
<tr>
|
||||
<td class="header-label">
|
||||
<nobr>Reason for Force Build:</nobr>
|
||||
</td>
|
||||
<td class="header-data">
|
||||
<xsl:value-of select="/cruisecontrol/integrationProperties/CCNetForceBuildReason"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:apply-templates select="$modification.list">
|
||||
<xsl:sort select="date" order="descending" data-type="text" />
|
||||
</xsl:apply-templates>
|
||||
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Last Modification template -->
|
||||
<xsl:template match="/cruisecontrol/modifications/modification">
|
||||
<xsl:if test="position() = 1">
|
||||
<tr>
|
||||
<td class="header-label"><nobr>Last changed:</nobr></td>
|
||||
<td class="header-data"><xsl:value-of select="date"/></td>
|
||||
</tr>
|
||||
<xsl:if test="string-length(issueUrl)!=0">
|
||||
<tr>
|
||||
<td class="header-label" valign="top"><nobr>Link to issue:</nobr></td>
|
||||
<td class="header-data"><A><xsl:attribute name="HREF"><xsl:value-of select="issueUrl"/></xsl:attribute><xsl:value-of select="issueUrl"/></A></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<tr>
|
||||
<td class="header-label" valign="top"><nobr>Last log entry:</nobr></td>
|
||||
<td class="header-data"><xsl:value-of select="comment"/></td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="html"/>
|
||||
|
||||
<xsl:variable name="modification.list" select="/cruisecontrol/modifications/modification"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
|
||||
<!-- Modifications -->
|
||||
<tr>
|
||||
<td class="sectionheader" colspan="5">
|
||||
<span style="font-size:125%"><b>MODIFICATIONS SINCE LAST BUILD</b> (<xsl:value-of select="count($modification.list)"/>)</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<xsl:apply-templates select="$modification.list">
|
||||
<xsl:sort select="date" order="descending" data-type="text" />
|
||||
</xsl:apply-templates>
|
||||
|
||||
<xsl:if test="count($modification.list) = 0">
|
||||
<tr><td>None since last build.</td></tr>
|
||||
</xsl:if>
|
||||
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Modifications template -->
|
||||
<xsl:template match="modification">
|
||||
<tr>
|
||||
<xsl:if test="position() mod 2=0">
|
||||
<xsl:attribute name="class">section-oddrow</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="position() mod 2!=0">
|
||||
<xsl:attribute name="class">section-evenrow</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<td class="section-data" valign="top"><xsl:value-of select="@type"/></td>
|
||||
<td class="section-data" valign="top"><xsl:value-of select="user"/></td>
|
||||
<td class="section-data" valign="top">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(url) = 1 ">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="url" />
|
||||
</xsl:attribute>
|
||||
<xsl:if test="project != ''"><xsl:value-of select="project"/>/</xsl:if>
|
||||
<xsl:value-of select="filename"/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="project != ''"><xsl:value-of select="project"/>/</xsl:if>
|
||||
<xsl:value-of select="filename"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td class="section-data" valign="top"><xsl:value-of select="comment"/></td>
|
||||
<td class="section-data" valign="top"><xsl:value-of select="date"/></td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:output method="html" />
|
||||
<xsl:variable name="nunit2.result.list"
|
||||
select="//test-results" />
|
||||
<xsl:variable name="nunit2.suite.list"
|
||||
select="$nunit2.result.list//test-suite" />
|
||||
<xsl:variable name="nunit2.suite.count"
|
||||
select="count($nunit2.result.list//test-suite)" />
|
||||
<xsl:variable name="nunit2.case.list"
|
||||
select="$nunit2.suite.list/results/test-case" />
|
||||
<xsl:variable name="nunit2.case.count"
|
||||
select="count($nunit2.case.list)" />
|
||||
<xsl:variable name="nunit2.time"
|
||||
select="sum($nunit2.result.list/test-suite[position()=1]/@time)" />
|
||||
<xsl:variable name="nunit2.failure.list"
|
||||
select="$nunit2.case.list/failure" />
|
||||
<xsl:variable name="nunit2.failure.count"
|
||||
select="count($nunit2.failure.list)" />
|
||||
<xsl:variable name="nunit2.success.list"
|
||||
select="$nunit2.case.list[@success='True']" />
|
||||
<xsl:variable name="nunit2.success.count"
|
||||
select="count($nunit2.success.list)" />
|
||||
<xsl:variable name="nunit2.notrun.list"
|
||||
select="$nunit2.case.list/reason" />
|
||||
<xsl:variable name="nunit2.notrun.count"
|
||||
select="count($nunit2.notrun.list)" />
|
||||
<xsl:variable name="junit.suite.list"
|
||||
select="//testsuite" />
|
||||
<xsl:variable name="junit.suite.count"
|
||||
select="count($junit.suite.list)" />
|
||||
<xsl:variable name="junit.suite.error.list"
|
||||
select="$junit.suite.list/error" />
|
||||
<xsl:variable name="junit.suite.error.count"
|
||||
select="count($junit.suite.error.list)" />
|
||||
<xsl:variable name="junit.case.list"
|
||||
select="$junit.suite.list/testcase" />
|
||||
<xsl:variable name="junit.case.count"
|
||||
select="count($junit.case.list)" />
|
||||
<xsl:variable name="junit.time"
|
||||
select="sum($junit.case.list/@time)" />
|
||||
<xsl:variable name="junit.failure.list"
|
||||
select="$junit.case.list/failure" />
|
||||
<xsl:variable name="junit.failure.count"
|
||||
select="count($junit.failure.list)" />
|
||||
<xsl:variable name="junit.success.list"
|
||||
select="$junit.case.list[@success='True']" />
|
||||
<xsl:variable name="junit.success.count"
|
||||
select="count($junit.success.list)" />
|
||||
<xsl:variable name="junit.error.list"
|
||||
select="$junit.case.list/error" />
|
||||
<xsl:variable name="junit.error.count"
|
||||
select="count($junit.error.list)" />
|
||||
<xsl:variable name="total.time"
|
||||
select="$nunit2.time + $junit.time" />
|
||||
<xsl:variable name="total.notrun.count"
|
||||
select="$nunit2.notrun.count" />
|
||||
<xsl:variable name="total.suite.count"
|
||||
select="$nunit2.suite.count + $junit.suite.count" />
|
||||
<xsl:variable name="total.run.count"
|
||||
select="$nunit2.case.count + $junit.case.count - $total.notrun.count" />
|
||||
<xsl:variable name="total.failure.count"
|
||||
select="$nunit2.failure.count + $junit.failure.count + $junit.error.count + $junit.suite.error.count" />
|
||||
<xsl:template match="/">
|
||||
<table cellpadding="2"
|
||||
cellspacing="0"
|
||||
border="0">
|
||||
<!-- Unit Tests -->
|
||||
<tr><td class="headernote" colspan="2"><br/><span style="font-size:125%;font-weight:bold">UNIT TESTING</span></td></tr>
|
||||
<tr>
|
||||
<td class="headernote"
|
||||
colspan="2">Suites run:
|
||||
<xsl:value-of select="$total.suite.count" />, Tests run:
|
||||
<xsl:value-of select="$total.run.count" />, Failures:
|
||||
<xsl:value-of select="$total.failure.count" />, Not run:
|
||||
<xsl:value-of select="$total.notrun.count" />, Time:
|
||||
<xsl:value-of select="$total.time" /> seconds</td>
|
||||
</tr>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$total.run.count = 0">
|
||||
<tr>
|
||||
<td colspan="2"
|
||||
class="note"><span style="color:#750;font-weight:bold">WARNING: NO TESTS RUN</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"
|
||||
class="failurenote">This project doesn't have any tests. Write some?</td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
<xsl:when test="$total.failure.count = 0">
|
||||
<tr>
|
||||
<td colspan="2"
|
||||
class="successnote"><span style="font-weight:bold;color:#080">ALL TESTS PASSED</span></td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates select="$junit.success.list | $nunit2.success.list" />
|
||||
<xsl:apply-templates select="$junit.suite.error.list" />
|
||||
<xsl:apply-templates select="$junit.error.list" />
|
||||
<xsl:apply-templates select="$junit.failure.list | $nunit2.failure.list" />
|
||||
<xsl:apply-templates select="$nunit2.notrun.list" />
|
||||
</table>
|
||||
</xsl:template>
|
||||
<!-- Unit Test Errors -->
|
||||
<xsl:template match="error">
|
||||
<tr>
|
||||
<td class="errornote">
|
||||
<xsl:value-of select="../@name" />
|
||||
</td>
|
||||
<td class="errornote"><span style="font-weight:bold;color:#400">ERROR</span></td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
<!-- Unit Test Failures -->
|
||||
<xsl:template match="failure">
|
||||
<tr>
|
||||
<td class="failurenote">
|
||||
<xsl:value-of select="../@name" />
|
||||
</td>
|
||||
<td class="failurenote"><span style="color:#600;font-weight:bold">FAIL</span></td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
<!-- Unit Test Successes -->
|
||||
<xsl:template match="test-case[@success='True']">
|
||||
<tr>
|
||||
<xsl:if test="($junit.success.count + position()) mod 2 = 0">
|
||||
<xsl:attribute name="class">oddrow</xsl:attribute>
|
||||
</xsl:if>
|
||||
<td class="successnote">
|
||||
<xsl:value-of select="@name" />
|
||||
</td>
|
||||
<td class="successnote"><span style="color:#060">PASS</span></td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
<!-- Unit Test Warnings -->
|
||||
<xsl:template match="reason">
|
||||
<tr>
|
||||
<td class="warningnote">
|
||||
<xsl:value-of select="../@name" />
|
||||
</td>
|
||||
<td class="warningnote"><span style="color:#750;font-weight:bold">WARN</span></td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user