Added build environment files

This commit is contained in:
Rick Falkvinge
2011-11-02 15:12:34 +00:00
parent 9106e5c9b1
commit 580416ad06
7 changed files with 776 additions and 0 deletions
+116
View File
@@ -0,0 +1,116 @@
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<project name="Activizr">
<workingDirectory>C:\Lab\Activizr\build</workingDirectory>
<artifactDirectory>C:\Lab\Activizr\artifact</artifactDirectory>
<webURL>http://build.activizr.com/server/auxiliary/project/Activizr/ViewLatestBuildReport.aspx</webURL>
<sourcecontrol type="svn">
<trunkUrl>svn://peregrine/Activizr/trunk</trunkUrl>
<workingDirectory>C:\Lab\Activizr\build</workingDirectory>
<cleanCopy>true</cleanCopy>
<timeout>1800000</timeout>
</sourcecontrol>
<triggers>
<intervalTrigger name="continuous" seconds="30" />
</triggers>
<labeller type="assemblyVersionLabeller">
<major>5</major>
<minor>0</minor>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\Lab\Activizr\build</workingDirectory>
<projectFile>Activizr.sln</projectFile>
<buildArgs>/p:Configuration=Autobuild</buildArgs>
<targets>Build</targets>
<timeout>1200</timeout>
<logger>C:\Program Files\CruiseControl.NET\server\Rodemeyer.MsBuildToCCnet.dll</logger>
</msbuild>
<!-- deploy -- only on success of all steps above -->
<exec>
<executable>cmd.exe</executable>
<buildArgs>/c echo %CCNetLabel% > C:\Lab\Activizr\build\Site5-Deployment\Release\BuildIdentity.txt</buildArgs>
</exec>
<buildpublisher>
<sourceDir>C:\Lab\Activizr\build\Site5-Deployment\Release</sourceDir>
<publishDir>\\peregrine\pirate-activizr</publishDir>
<useLabelSubDirectory>false</useLabelSubDirectory>
<cleanPublishDirPriorToCopy>true</cleanPublishDirPriorToCopy>
<alwaysPublish>false</alwaysPublish>
</buildpublisher>
<exec>
<executable>xcopy.exe</executable>
<buildArgs>/s /y C:\Lab\Activizr\build\Site5-Deployment\Release \\peregrine\pirate-activizr</buildArgs>
</exec>
<!-- Analysis -- QA that is not build-breaking: FxCop etc. -->
<exec>
<executable>"C:\Program Files\Microsoft FxCop 1.36\FxCopCmd.exe"</executable>
<baseDirectory>C:\Lab\Activizr\build</baseDirectory>
<buildArgs>/p:"Activizr.FxCop" /out:"FxCop-results.xml" /gac</buildArgs>
<buildTimeoutSeconds>300</buildTimeoutSeconds>
</exec>
</tasks>
<publishers>
<merge>
<files>
<file>C:\Lab\Activizr\build\msbuild-output.xml</file>
<file>C:\Lab\Activizr\build\FxCop-results.xml</file>
</files>
</merge>
<xmllogger />
<email mailport="25" includeDetails="TRUE">
<from>builds@activizr.com</from>
<mailhost>192.168.80.4</mailhost>
<users>
<user name="Rick Falkvinge" group="buildmaster" address="activizr-builds@falkvinge.net" />
<!-- <user name="Jörgen Lindell" group="buildmaster" address="jorgen.lindell@gmail.com" /> -->
</users>
<groups>
<group name="devs">
<notifications>
<notificationType>Failed</notificationType>
<notificationType>Fixed</notificationType>
</notifications>
</group>
<group name="buildmaster">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
</groups>
<modifierNotificationTypes>
<NotificationType>Failed</NotificationType>
<NotificationType>Fixed</NotificationType>
</modifierNotificationTypes>
<subjectSettings>
<subject buildResult="StillBroken" value="Build is STILL broken for Activizr" />
</subjectSettings>
<xslFiles>
<file>xsl\header.xsl</file>
<file>xsl\msbuild2ccnet.xsl</file>
<file>xsl\unittests.xsl</file>
<file>xsl\fxcop-summary_1_36.xsl</file>
<file>xsl\modifications.xsl</file>
<file>xsl\fxcop-report_1_36.xsl</file>
</xslFiles>
</email>
</publishers>
</project>
</cruisecontrol>
+161
View File
@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="xslFiles" type="ThoughtWorks.CruiseControl.Core.Config.XslFilesSectionHandler,ThoughtWorks.CruiseControl.Core"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<section name="cruiseServer" type="ThoughtWorks.CruiseControl.Core.Config.ServerConfigurationHandler,ThoughtWorks.CruiseControl.Core"/>
</configSections>
<!-- Specifies the stylesheets that are used to transform the build results when using the EmailPublisher -->
<xslFiles>
<file name="xsl\header.xsl"/>
<file name="xsl\msbuild2ccnet.xsl"/>
<file name="xsl\unittests.xsl"/>
<file name="xsl\fit.xsl"/>
<file name="xsl\modifications.xsl"/>
<file name="xsl\fxcop-summary_1_36.xsl"/>
</xslFiles>
<cruiseServer>
</cruiseServer>
<!-- Defines the port and protocol that the ccnet server will use to service remote requests -->
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="21234">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
<appSettings>
<!--
Used by the WebDashboard ServerLog plugin to locate the log file produced by the LogFileTraceListener from Log4Net
must be the same value as in the logger named RollingFileAppender in the log4Net section below.
-->
<add key="ServerLogFilePath" value="${TMP}\ccnet.log"/>
<!-- Used by the WebDashboard ServerLog plugin to determine how many lines from the log file should be read -->
<add key="ServerLogFileLines" value="100"/>
<!-- Turns on or off the file watcher used to monitor the ccnet.config file -->
<add key="WatchConfigFile" value="true"/>
<!--when filled in this location is also scanned for assemblies following the name convention : ccnet.*.plugin (case sensitive)-->
<add key="PluginLocation" value=""/>
<!-- the main data drive used by CruiseControl.NET. This is used for checking the amount of free disk space. Defaults to c:\ -->
<add key="DataDrive" value=""/>
<!-- The amount of time (in seconds) a build log will be cached for before it is expired. The minimum allowed value is 10 seconds. Default 5 minutes -->
<add key="cacheTime" value=""/>
</appSettings>
<startup>
</startup>
<log4net>
<level>
<name value="TRACE" />
<value value="20000" />
</level>
<root>
<!--
Change the value in the next line to alter the amount of logging generated by CruiseControl.NET.
The following values are supported: TRACE, DEBUG, INFO, WARN, ERROR, OFF.
For more detailed information on how to configure log4net, see http://logging.apache.org/log4net/
-->
<level value="TRACE"/>
<appender-ref ref="Console"/>
<appender-ref ref="RollingFileAppender"/>
<appender-ref ref="EventLogAppender"/>
<appender-ref ref="TraceAppender"/>
</root>
<appender name="Console" type="log4net.Appender.ColoredConsoleAppender">
<mapping>
<level value="ERROR"/>
<foreColor value="White"/>
<backColor value="Red, HighIntensity"/>
</mapping>
<mapping>
<level value="DEBUG"/>
<foreColor value="Green"/>
</mapping>
<mapping>
<level value="WARN"/>
<foreColor value="White"/>
<backColor value="Blue, HighIntensity"/>
</mapping>
<mapping>
<level value="INFO"/>
<foreColor value="White"/>
</mapping>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%thread:%level] %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="${TMP}\ccnet.log"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread:%level] %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<levelMin value="ERROR" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="TraceAppender" type="log4net.Appender.RollingFileAppender" >
<file value="${TMP}\ccnet.trace"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] [%level] - %message%newline" />
</layout>
</appender>
</log4net>
<!-- Handle backwards compatibility with previous versions of NetReflector (for plug-ins etc.) -->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NetReflector" publicKeyToken="2f4dd8b32acbcd8e" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.120" newVersion="1.1.2009.1214"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+155
View File
@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="xslFiles" type="ThoughtWorks.CruiseControl.Core.Config.XslFilesSectionHandler,ThoughtWorks.CruiseControl.Core"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<section name="cruiseServer" type="ThoughtWorks.CruiseControl.Core.Config.ServerConfigurationHandler,ThoughtWorks.CruiseControl.Core"/>
</configSections>
<!-- Specifies the stylesheets that are used to transform the build results when using the EmailPublisher -->
<xslFiles>
<file name="xsl\header.xsl"/>
<file name="xsl\compile.xsl"/>
<file name="xsl\unittests.xsl"/>
<file name="xsl\fit.xsl"/>
<file name="xsl\modifications.xsl"/>
<file name="xsl\fxcop-summary_1_36.xsl"/>
</xslFiles>
<cruiseServer>
</cruiseServer>
<!-- Defines the port and protocol that the ccnet server will use to service remote requests -->
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="21234">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
<log4net>
<level>
<name value="TRACE" />
<value value="20000" />
</level>
<root>
<!--
Change the value in the next line to alter the amount of logging generated by CruiseControl.NET.
The following values are supported: TRACE, DEBUG, INFO, WARN, ERROR, OFF.
For more detailed information on how to configure log4net, see http://logging.apache.org/log4net/
-->
<level value="TRACE"/>
<appender-ref ref="Console"/>
<appender-ref ref="RollingFileAppender"/>
<appender-ref ref="EventLogAppender"/>
<appender-ref ref="TraceAppender"/>
</root>
<appender name="Console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%thread:%level] %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="${TMP}\ccnet.log"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<!-- Note: Core.Logging.ServerLogFileReader depends on having "[%thread" present in the pattern -->
<conversionPattern value="%date [%thread:%level] %message%newline"/>
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<levelMin value="ERROR" />
<levelMax value="ERROR" />
</filter>
</appender>
<appender name="TraceAppender" type="log4net.Appender.RollingFileAppender" >
<file value="${TMP}\ccnet.trace"/>
<appendToFile value="true"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="10MB"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] [%level] - %message%newline" />
</layout>
</appender>
</log4net>
<appSettings>
<!-- Without this appSetting ccservice will look for ccnet.config in its own directory. -->
<!-- <add key="ccnet.config" value="c:\some\path\to\ccnet.config"/> -->
<add key="service.name" value="CCService"/>
<add key="remoting" value="on"/>
<!--
Used by the WebDashboard ServerLog plugin to locate the log file produced by the LogFileTraceListener from Log4Net
must be the same value as in the logger named RollingFileAppender in the log4Net section below.
-->
<add key="ServerLogFilePath" value="${TMP}\ccnet.log"/>
<!-- Used by the WebDashboard ServerLog plugin to determine how many lines from the log file should be read -->
<add key="ServerLogFileLines" value="100"/>
<!-- Turns on or off the file watcher used to monitor the ccnet.config file -->
<add key="WatchConfigFile" value="true"/>
<!--when filled in this location is also scanned for assemblies following the name convention : ccnet.*.plugin (case sensitive)-->
<add key="PluginLocation" value=""/>
<!-- the main data drive used by CruiseControl.NET. This is used for checking the amount of free disk space. Defaults to c:\ -->
<add key="DataDrive" value=""/>
<!-- The amount of time (in seconds) a build log will be cached for before it is expired. The minimum allowed value is 10 seconds. Default 5 minutes -->
<add key="cacheTime" value=""/>
</appSettings>
<startup>
</startup>
<!-- Handle backwards compatibility with previous versions of NetReflector (for plug-ins etc.) -->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NetReflector" publicKeyToken="2f4dd8b32acbcd8e" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.120" newVersion="1.1.2009.1214"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+84
View File
@@ -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>
+63
View File
@@ -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">
<br/><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>
+53
View File
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright © 2006 by Christian Rodemeyer (mailto:christian@atombrenner.de) -->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates select="//msbuild" />
</xsl:template>
<xsl:template match="msbuild">
<table class="section-table" cellpadding="2" cellspacing="0" border="0" width="98%">
<tr><td class="sectionheader">
<br/><span style="font-weight:bold;font-size:125%">BUILD NOTES
<xsl:choose>
<xsl:when test="@error_count > 0">
(<span style="color:#800"><xsl:value-of select="@error_count"/> ERRORS</span>)
</xsl:when>
<xsl:when test="@warning_count > 0">
(<span style="color:#750"><xsl:value-of select="@warning_count"/> WARNINGS</span>)
</xsl:when>
<xsl:otherwise>
(<span style="color:#080">CLEAN BUILD</span>)
</xsl:otherwise>
</xsl:choose>
</span></td></tr>
<xsl:if test="@error_count = 0 and @warning_count = 0"> <tr><td><!--<img src="/ccnet/your_happy_image.jpg" alt="Happy Image :-)" />--> Juchuu !!!</td></tr></xsl:if>
<xsl:apply-templates select="project[error|warning]" />
</table>
</xsl:template>
<xsl:template match="project" >
<tr>
<td class="section-project">
<b>Project <xsl:value-of select="@name"/></b>:
</td>
</tr>
<tr>
<xsl:element name="td">
<xsl:attribute name="class">
<xsl:if test="../@error_count > 0">error</xsl:if>
<xsl:if test="../@error_count &lt;= 0">warning</xsl:if>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</tr>
</xsl:template>
<xsl:template match="error|warning">
<xsl:if test="@code!=''"><xsl:value-of select="@code" />: </xsl:if>
<xsl:value-of select="@message" /> in <xsl:value-of select="@name" /> <xsl:value-of select="@pos"/><br/>
</xsl:template>
<xsl:template match="message"></xsl:template>
</xsl:stylesheet>
+144
View File
@@ -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>