Permalink
Browse files

rollup - see messages below for individual commit notes

rev430 Fixed OpenCover results not loading (see http://code.google.com/p/uppercut/issues/detail?id=48)
rev429 Added check that the Uppercut tasks are loaded, so that the step can be run in isolation from the main build (see http://code.google.com/p/uppercut/issues/detail?id=47)
rev428 fixing a small typo in compile.step
rev426 * Added new function uppercut::is-os64bit to provide a means of checking the bit-ness of the CPU architecture (issue 26) - part 1
rev 424 Fixed error when code metrics cannot locate assemblies to analyse (Issue 45);
Tweaked logging level of code metrics to match that of equivalent steps in NUnit and NCover;
rev423 implementing fix for customize.build that Alan Howard noted
  • Loading branch information...
ferventcoder committed Jan 18, 2012
1 parent aef9839 commit 5752dc64db3238d6967e0c8de70b74b315dbc67b
Showing with 51,664 additions and 50,124 deletions.
  1. +3 −0 README.markdown
  2. +1 −1 assemblies/build/UppercuT.xml
  3. +1 −1 assemblies/build/analyze.step
  4. +63 −0 assemblies/build/analyzers/cover.step
  5. +14 −9 assemblies/build/analyzers/metrics.step
  6. +150 −0 assemblies/build/analyzers/ncover.cover.step
  7. +1 −0 assemblies/build/analyzers/nunit.test.step
  8. +144 −0 assemblies/build/analyzers/opencover.cover.step
  9. +1 −1 assemblies/build/compile.step
  10. +40 −40 assemblies/build/customize.bat
  11. +1 −1 assemblies/build/customize.build
  12. +1 −1 assemblies/build/gemsBuild.step
  13. +1 −1 assemblies/build/gemsPrepare.step
  14. +1 −1 assemblies/build/nugetBuild.step
  15. +1 −1 assemblies/build/nugetPrepare.step
  16. BIN assemblies/build/uc.exe
  17. BIN assemblies/build/uppercut.dll
  18. BIN assemblies/build/uppercut.tasks.dll
  19. +38 −38 bdddoc.bat
  20. +47 −47 build.custom/bdddoc.build
  21. +22 −22 build.custom/zip.pre.build
  22. +1 −1 build/UppercuT.xml
  23. +1 −1 build/analyze.step
  24. +63 −0 build/analyzers/cover.step
  25. +14 −9 build/analyzers/metrics.step
  26. +150 −0 build/analyzers/ncover.cover.step
  27. +1 −0 build/analyzers/nunit.test.step
  28. +144 −0 build/analyzers/opencover.cover.step
  29. +1 −1 build/compile.step
  30. +1 −1 build/customize.build
  31. +1 −1 build/gemsBuild.step
  32. +1 −1 build/gemsPrepare.step
  33. +1 −1 build/nugetBuild.step
  34. +1 −1 build/nugetPrepare.step
  35. BIN build/uc.exe
  36. BIN build/uppercut.dll
  37. BIN build/uppercut.tasks.dll
  38. BIN docs/IntegrateUppercuTWithHudson.doc
  39. +1 −1 docs/Samples/CC.NET/ReadMe.txt
  40. +71 −71 docs/Samples/CC.NET/webdashboard/dashboard.config
  41. +109 −109 docs/Samples/CC.NET/webdashboard/image.ashx
  42. +1,161 −1,161 docs/Samples/CC.NET/webdashboard/xsl/ndependreport-ccnet.v2.xsl
  43. +38 −38 docs/Samples/CustomizingBuildSamples/BDDDoc/bdddoc.bat
  44. +51 −51 docs/Samples/CustomizingBuildSamples/BDDDoc/build.custom/bdddoc.build
  45. +133 −133 docs/Samples/CustomizingBuildSamples/CustomCompiling/compile.replace.step
  46. +1 −1 docs/Samples/CustomizingBuildSamples/ILMerge/build.custom/ilmerge.internalize.ignore.txt
  47. +30 −30 docs/Samples/CustomizingBuildSamples/ILMerge/build.custom/ilmerge.pre.build
  48. +107 −107 docs/Samples/CustomizingBuildSamples/ILMerge/build/ilmerge.build
  49. +35 −35 docs/Samples/CustomizingBuildSamples/ILMerge/ilmerge.bat
  50. +36 −36 docs/Samples/CustomizingBuildSamples/MonoMigrationAnalyzer/moma.bat
  51. +36 −36 docs/Samples/CustomizingBuildSamples/NCover/ncover.bat
  52. +12 −12 docs/Samples/CustomizingBuildSamples/WiX/build.custom/default.post.build
  53. +103 −103 docs/Samples/CustomizingBuildSamples/WiX/build.custom/wix.build
  54. +53 −53 docs/Samples/CustomizingBuildSamples/Zip/build.custom/zip.post.build
  55. +22 −22 docs/Samples/CustomizingBuildSamples/Zip/build.custom/zip.pre.build
  56. +4 −4 docs/Samples/scripts/SVN/ReadMe.txt
  57. +30 −30 docs/Samples/scripts/SVN/branch.bat
  58. +31 −31 docs/Samples/scripts/SVN/branchWithCheckout.bat
  59. +28 −28 docs/Samples/scripts/SVN/checkoutBranch.bat
  60. +28 −28 docs/Samples/scripts/SVN/checkoutTrunk.bat
  61. +23 −23 docs/Samples/scripts/SVN/commit.bat
  62. +173 −173 docs/legal/LICENSE
  63. +9 −9 docs/legal/NOTICE
  64. +103 −103 lib/ILMerge/ILMerge License.rtf
  65. +12 −12 lib/MbUnit2/MbUnit.Cons.exe.config
  66. +6,928 −6,928 lib/MbUnit2/MbUnit.Framework.XML
  67. +13 −13 lib/MbUnit2/MbUnit.GUI.exe.config
  68. +1,931 −1,931 lib/MbUnit2/TestFu.XML
  69. +287 −287 lib/NCover/ActiproEULA.html
  70. +122 −122 lib/NCover/ConsoleConfig.xsd
  71. +93 −93 lib/NCover/ConsoleExample.config
  72. +338 −338 lib/NCover/Coverage.xsl
  73. +467 −467 lib/NCover/CoverageReport.xsl
  74. +333 −333 lib/NCover/LicencePersonal.rtf
  75. +7 −7 lib/NCover/Microsoft.VC80.CRT.manifest
  76. +5 −5 lib/NCover/NCover.Console.exe.config
  77. +7 −7 lib/NCover/NCoverExplorer.exe.config
  78. +303 −303 lib/NCover/NCoverExplorerFAQ.html
  79. +874 −874 lib/NCover/NCoverExplorerReleaseNotes.html
  80. +429 −429 lib/NCover/NCoverFAQ.html
  81. +15 −15 lib/NCover/VC80CRT.MAN
  82. +299 −299 lib/NCover/license.txt
  83. +84 −84 lib/NUnit/NUnitTests.config
  84. +14 −14 lib/NUnit/NUnitTests.nunit
  85. +3 −3 lib/NUnit/agent.conf
  86. +18 −18 lib/NUnit/agent.log.conf
  87. +10,113 −10,113 lib/NUnit/framework/nunit.framework.xml
  88. +18 −18 lib/NUnit/launcher.log.conf
  89. +90 −90 lib/NUnit/nunit-x86.exe.config
  90. +90 −90 lib/NUnit/nunit.exe.config
  91. +76 −76 lib/NUnit/pnunit-agent.exe.config
  92. +76 −76 lib/NUnit/pnunit-launcher.exe.config
  93. +1 −1 lib/NUnit/runpnunit.bat
  94. +23 −23 lib/NUnit/test.conf
  95. BIN lib/NuGet/NuGet.exe
  96. BIN lib/OpenCover/Gendarme.Framework.dll
  97. BIN lib/OpenCover/Gendarme.Rules.Maintainability.dll
  98. +19 −0 lib/OpenCover/License.txt
  99. BIN lib/OpenCover/Microsoft.Practices.ServiceLocation.dll
  100. BIN lib/OpenCover/Microsoft.Practices.Unity.dll
  101. BIN lib/OpenCover/Mono.Cecil.Pdb.dll
  102. BIN lib/OpenCover/Mono.Cecil.dll
  103. BIN lib/OpenCover/OpenCover.Console.exe
  104. +8 −0 lib/OpenCover/OpenCover.Console.exe.config
  105. BIN lib/OpenCover/OpenCover.Framework.dll
  106. BIN lib/OpenCover/x64/OpenCover.Profiler.dll
  107. BIN lib/OpenCover/x86/OpenCover.Profiler.dll
  108. BIN lib/ReportGenerator/ICSharpCode.NRefactory.dll
  109. +202 −0 lib/ReportGenerator/LICENSE.txt
  110. +126 −0 lib/ReportGenerator/Readme.txt
  111. BIN lib/ReportGenerator/ReportGenerator.exe
  112. BIN lib/ReportGenerator/log4net.dll
  113. +6 −6 lib/bdddoc/bdddoc.css
  114. +6,928 −6,928 lib/developwithpassion.bdd/MbUnit.Framework.xml
  115. +2,817 −2,817 lib/developwithpassion.bdd/QuickGraph.Algorithms.xml
  116. +3,125 −3,125 lib/developwithpassion.bdd/QuickGraph.xml
  117. +1,326 −1,326 lib/developwithpassion.bdd/Refly.xml
  118. +1,931 −1,931 lib/developwithpassion.bdd/TestFu.xml
  119. +11 −11 lib/developwithpassion.bdd/classtoincludefortdd.net/EmptyTestContainer.cs
  120. +241 −241 lib/developwithpassion.bdd/resharper/FileTemplate.xml
  121. +5,226 −5,226 lib/developwithpassion.bdd/rhino.mocks.xml
  122. +5 −5 nitriq.nitriqProj
  123. +161 −161 nitriq.nq
  124. +250 −250 product/uppercut.build/NDepend.xml
  125. +4 −4 product/uppercut.build/Properties/AssemblyInfo.cs
  126. +1 −1 product/uppercut.build/build/analyze.step
  127. +63 −0 product/uppercut.build/build/analyzers/cover.step
  128. +3 −3 product/uppercut.build/build/analyzers/mbunit2.test.step
  129. +14 −9 product/uppercut.build/build/analyzers/metrics.step
  130. +150 −0 product/uppercut.build/build/analyzers/ncover.cover.step
  131. +1 −0 product/uppercut.build/build/analyzers/nunit.test.step
  132. +144 −0 product/uppercut.build/build/analyzers/opencover.cover.step
  133. +1 −1 product/uppercut.build/build/compile.step
  134. +40 −40 product/uppercut.build/build/customize.bat
  135. +1 −1 product/uppercut.build/build/customize.build
  136. +1 −1 product/uppercut.build/build/gemsBuild.step
  137. +1 −1 product/uppercut.build/build/gemsPrepare.step
  138. +1 −1 product/uppercut.build/build/nugetBuild.step
  139. +1 −1 product/uppercut.build/build/nugetPrepare.step
  140. +8 −8 product/uppercut.build/deployment/templates/AppDeployment.bat
  141. +1 −1 product/uppercut.build/settings/SettingsFileReadMe.txt
  142. +10 −2 product/uppercut.build/settings/UppercuT.config
  143. +11 −3 product/uppercut.build/uppercut.build.csproj
  144. +21 −21 product/uppercut.settings.editor/Program.cs
  145. +36 −36 product/uppercut.settings.editor/Properties/AssemblyInfo.cs
  146. +116 −116 product/uppercut.settings.editor/Properties/Resources.resx
  147. +7 −7 product/uppercut.settings.editor/Properties/Settings.settings
  148. +138 −138 product/uppercut.settings.editor/SettingsEditor.Designer.cs
  149. +31 −31 product/uppercut.settings.editor/SettingsEditor.cs
  150. +125 −125 product/uppercut.settings.editor/SettingsEditor.resx
  151. +74 −0 product/uppercut.tasks/CustomExtensionFunctions.cs
  152. +4 −4 product/uppercut.tasks/Properties/AssemblyInfo.cs
  153. +1 −0 product/uppercut.tasks/uppercut.tasks.csproj
  154. +11 −11 product/uppercut.tests/EmptyTestContainer.cs
  155. +4 −4 product/uppercut.tests/Properties/AssemblyInfo.cs
  156. +79 −79 product/uppercut.tests/infrastructure/containers/ContainerSpecs.cs
  157. +131 −131 product/uppercut.tests/infrastructure/containers/custom/WindsorContainerSpecs.cs
  158. +74 −74 product/uppercut.tests/infrastructure/logging/LogSpecs.cs
  159. +32 −32 product/uppercut.tests/infrastructure/logging/custom/Log4NetLogFactorySpecs.cs
  160. +141 −141 product/uppercut.tests/infrastructure/logging/custom/Log4NetLoggerSpecs.cs
  161. +80 −80 product/uppercut.tests/template.builder/settings/DrSettings.cs
  162. +80 −80 product/uppercut.tests/template.builder/settings/LocalSettings.cs
  163. +80 −80 product/uppercut.tests/template.builder/settings/ProdSettings.cs
  164. +80 −80 product/uppercut.tests/template.builder/settings/QaSettings.cs
  165. +80 −80 product/uppercut.tests/template.builder/settings/Test2Settings.cs
  166. +80 −80 product/uppercut.tests/template.builder/settings/TestSettings.cs
  167. +629 −629 product/uppercut.tests/template.builder/templates/ConfigTemplate1.cs
  168. +4 −4 product/uppercut/Properties/AssemblyInfo.cs
  169. +8 −8 product/uppercut/infrastructure/ApplicationParameters.cs
  170. +16 −16 product/uppercut/infrastructure/containers/Container.cs
  171. +6 −6 product/uppercut/infrastructure/containers/IContainer.cs
  172. +18 −18 product/uppercut/infrastructure/containers/custom/WindsorContainer.cs
  173. +10 −10 product/uppercut/infrastructure/logging/ILog.cs
  174. +8 −8 product/uppercut/infrastructure/logging/ILogFactory.cs
  175. +32 −32 product/uppercut/infrastructure/logging/Log.cs
  176. +13 −13 product/uppercut/infrastructure/logging/custom/Log4NetLogFactory.cs
  177. +39 −39 product/uppercut/infrastructure/logging/custom/Log4NetLogger.cs
  178. +54 −54 product/uppercut/infrastructure/logging/custom/MultipleLogger.cs
  179. +13 −13 product/uppercut/infrastructure/logging/custom/MultipleLoggerLogFactory.cs
  180. +43 −43 product/uppercut/infrastructure/logging/custom/NAntLogger.cs
  181. +17 −17 product/uppercut/template.builder/TokenReplacer.cs
  182. +4 −2 settings/UppercuT.config
View
@@ -58,6 +58,9 @@ It helps keep to the product updated, pays for site hosting, etc. https://www.pa
=1.x.x.x=
* Adding in support for StorEvil.
==1.4.2.0==
* FIX: Issue 41 - v1.4 no longer runs nuget or gems steps - see http://code.google.com/p/uppercut/issues/detail?id=41 for details. (420)
==1.4.1.0==
* FIX: Issue 40 - customizations fail when the folder path has build in it more than once - see http://code.google.com/p/uppercut/issues/detail?id=40 for details. (418)
* FIX: Issue 39 - The detailed build.log is not being written to sometimes - see http://code.google.com/p/uppercut/issues/detail?id=39 for details. (415)
@@ -1,4 +1,4 @@
<?xml version="1.0" ?>
<uppercut>
<version>1.4.1.0</version>
<version>1.4.2.0</version>
</uppercut>
@@ -34,7 +34,7 @@
<target name="run_analyzers">
<nant buildfile="${dirs.current.file}${path.separator}analyzers${path.separator}test.step" inheritall="true" />
<nant buildfile="${dirs.current.file}${path.separator}analyzers${path.separator}ncover.step" inheritall="true" failonerror="false" />
<nant buildfile="${dirs.current.file}${path.separator}analyzers${path.separator}cover.step" inheritall="true" failonerror="false" />
<nant buildfile="${dirs.current.file}${path.separator}analyzers${path.separator}ndepend.step" inheritall="true" failonerror="false" />
<nant buildfile="${dirs.current.file}${path.separator}analyzers${path.separator}nitriq.step" inheritall="true" failonerror="false" />
<nant buildfile="${dirs.current.file}${path.separator}analyzers${path.separator}metrics.step" inheritall="true" failonerror="false" />
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="CoverageRunner" default="go">
<!-- Project UppercuT - http://projectuppercut.org -->
<!-- DO NOT EDIT THIS FILE -->
<property name="build.config.settings" value="__NONE__" overwrite="false" />
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
<property name="file.current.no_extension" value="cover" />
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
<property name="path.to.toplevel" value="..${path.separator}.." />
<property name="folder.build_scripts" value="build" overwrite="false" />
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}${path.separator}analyzers" />
<property name="folder.code_build" value="build_output" overwrite="false" />
<property name="dirs.build" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_build}" />
<property name="folder.app.drop" value="${project.name}" overwrite="false" />
<property name="dirs.build.code" value="${dirs.build}${path.separator}${folder.app.drop}" overwrite="false" />
<property name="cover.framework" value="opencover" overwrite="false" />
<property name="is.replaced" value="false" />
<property name="fail.build.on.error" value="true" />
<property name="app.ruby" value="C:\Ruby\bin\ruby.exe" overwrite="false" />
<property name="app.powershell" value="%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe" overwrite="false" />
<target name="go" depends="load_uppercut_assemblies, run_tasks" />
<property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
<property name="path.uppercut.assembly" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts}${path.separator}${file.uppercut.assembly}" />
<target name="load_uppercut_assemblies">
<loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
</target>
<target name="run_tasks">
<echo level="Warning" message="" />
<echo level="Warning" message="====================" />
<echo level="Warning" message="${project::get-name()}" />
<echo level="Warning" message="====================" />
<call target="prepare" if="${target::exists('prepare')}" />
<customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
<customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
<call target="run_normal_tasks" if="${not is.replaced}" />
<customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
</target>
<target name="run_normal_tasks"
depends="run_coverage"
description="Analysing project for test coverage." />
<target name="run_coverage">
<nant buildfile="${dirs.current}${path.separator}ncover.cover.step" inheritall="true" if="${cover.framework=='ncover'}" />
<nant buildfile="${dirs.current}${path.separator}opencover.cover.step" inheritall="true" if="${cover.framework=='opencover'}" />
<call target="set_normal_failure_mode" />
</target>
<target name="open_results">
<nant buildfile="${dirs.current}${path.separator}ncover.cover.step" target="open_results" inheritall="true" if="${cover.framework=='ncover'}" />
<nant buildfile="${dirs.current}${path.separator}opencover.cover.step" target="open_results" inheritall="true" if="${cover.framework=='opencover'}" />
</target>
<target name="set_normal_failure_mode">
<property name="nant.onfailure" value="fail" />
</target>
</project>
@@ -30,7 +30,13 @@
<property name="is.replaced" value="false" />
<property name="fail.build.on.error" value="false" />
<target name="go" depends="run_tasks" if="${file::exists(app.metrics)}" />
<target name="go" depends="load_uppercut_assemblies, run_tasks" if="${file::exists(app.metrics)}" />
<property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
<property name="path.uppercut.assembly" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts}${path.separator}${file.uppercut.assembly}" />
<target name="load_uppercut_assemblies">
<loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
</target>
<target name="run_tasks" if="${file::exists(app.metrics)}" >
<echo level="Warning" message="" />
@@ -56,9 +62,9 @@
if="${file::exists(app.metrics)}" />
<target name="get_regular_dlls">
<echo message="Getting output dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
<echo level="warning" message="Getting output dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
<property name="dll.names" value="" />
<property name="dll.args" value="" />
<property name="dll.args" value="" />
<foreach item="File" property="dll.filename">
<in>
<items>
@@ -78,17 +84,17 @@
</in>
<do>
<property name="dll.names" value="${dll.names + ' ' + string::replace(string::replace(dll.filename,path::get-full-path(dirs.build.code) + '\',''),'\',path.separator) + ''}" />
<property name="dll.args" value="${dll.args + ' /f:&quot;' + string::replace(string::replace(dll.filename,path::get-full-path(dirs.build.code) + '\',''),'\',path.separator) + '&quot;'}" />
<property name="dll.args" value="${dll.args + ' /f:&quot;' + string::replace(string::replace(dll.filename,path::get-full-path(dirs.build.code) + '\',''),'\',path.separator) + '&quot;'}" />
</do>
</foreach>
<property name="dlls.regular" value="${dll.names}" />
<echo level="Warning" message="Running Visual Studio Code Metrics against these files - ${dlls.regular}." />
<echo level="Warning" message="Running Visual Studio Code Metrics against these files - ${dll.names}." unless="${dll.names == ''}" />
<echo level="Warning" message="No dlls to run against." if="${dll.names == ''}" />
<property name="args.metrics" value=" ${dll.args} ${args.metrics}" />
<property name="args.metrics" value=" ${dll.args} ${args.metrics}" />
</target>
<target name="metrics" if="${file::exists(app.metrics)}" >
<target name="metrics" if="${file::exists(app.metrics) and dll.args != ''}" >
<echo level="Warning" message="Attempting to run Visual Studio Code Metrics. Creating file at ${file.metrics_results} and logging at ${file.metrics_log}." />
<exec program="${app.metrics}" workingdir="${dirs.build.code}">
@@ -101,6 +107,5 @@
<echo message="Opening results - ${path::get-full-path(dirs.metrics_results) + path.separator + file.metrics_results}."/>
<results display="${path::get-full-path(dirs.metrics_results) + path.separator + file.metrics_results}" />
</target>
</project>
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="NCover" default="go">
<!-- Project UppercuT - http://projectuppercut.org -->
<!-- DO NOT EDIT THIS FILE - NCover uses MbUnit to run tests - find out more at http://uppercut.pbwiki.com -->
<property name="build.config.settings" value="__NONE__" overwrite="false" />
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
<include buildfile="..${path.separator}csharp.functions" />
<property name="file.current.no_extension" value="ncover" />
<property name="dirs.current" value="${directory::get-current-directory()}" />
<property name="dirs.current.file" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
<property name="folder.build_scripts" value="build" overwrite="false" />
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${folder.build_scripts_custom}${path.separator}analyzers" />
<property name="folder.code_build" value="build_output" overwrite="false" />
<property name="dirs.build" value="${dirs.current}${path.separator}${folder.code_build}" />
<property name="folder.app.drop" value="${project.name}" overwrite="false" />
<property name="dirs.build.code" value="${dirs.build}${path.separator}${folder.app.drop}" overwrite="false" />
<property name="folder.build_artifacts" value="build_artifacts" overwrite="false" />
<property name="dirs.build_artifacts" value="${path::get-full-path(dirs.build)}${path.separator}${folder.build_artifacts}" />
<property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
<property name="test.framework" value="mbunit" overwrite="false" />
<property name="microsoft.framework" value="net-3.5" overwrite="false" />
<property name="number.satisfactory_coverage" value="85" overwrite="false" />
<property name="fail.if_ncover_fails" value="false" overwrite="false" />
<property name="folder.references" value="lib" overwrite="false" />
<property name="dirs.lib" value="${dirs.current}${path.separator}${folder.references}" overwrite="false" />
<property name="dirs.ncover_results" value="${path::get-full-path(dirs.build_artifacts)}${path.separator}ncover" />
<property name="app.ncover.tester" value="${path::get-full-path(dirs.lib)}${path.separator}MbUnit2${path.separator}MbUnit.Cons.exe" overwrite="false" />
<property name="app.ncover" value="${path::get-full-path(dirs.lib)}${path.separator}NCover${path.separator}NCover.Console.exe" overwrite="false" />
<property name="app.ncover.explorer" value="${path::get-full-path(dirs.lib)}${path.separator}NCover${path.separator}NCoverExplorer.Console.exe" overwrite="false" />
<property name="file.ncover_results" value="${dirs.ncover_results}${path.separator}${project.name}.ncover.xml" />
<property name="file.ncover_log" value="${dirs.ncover_results}${path.separator}${project.name}.ncover.log" />
<property name="file.xml.code_coverage_results" value="${project.name}.CodeCoverageSummary-results.xml" />
<property name="file.html.code_coverage_results" value="${project.name}.CodeCoverageSummary-results.html" />
<property name="tests.excluded_categories.comma_separated" value="Database,Integration,Slow,NotWorking" overwrite="false" />
<property name="test.args" value="" />
<property name="test.args" value="/rt:Text /rnf:mbUnit /rf:&quot;${dirs.ncover_results}&quot; /ec:${tests.excluded_categories.comma_separated}" if="${test.framework=='mbunit2'}" />
<property name="test.args" value="/xml:&quot;${dirs.ncover_results}${path.separator}nunit-results.xml&quot; /nologo /framework=${microsoft.framework} /exclude:${tests.excluded_categories.comma_separated}" if="${test.framework=='nunit'}" />
<!--property name="test.args" value="/xml:&quot;${dirs.ncover_results}\nunit-results.xml&quot; /nologo /framework=${microsoft.framework} /exclude:${tests.excluded_categories.comma_separated}" if="${test.framework=='nunit'}" /-->
<property name="is.replaced" value="false" />
<property name="fail.build.on.error" value="false" />
<target name="go" depends="run_tasks" if="${file::exists(app.ncover) and test.framework !='none'}" />
<target name="run_tasks" if="${file::exists(app.ncover) and test.framework !='none'}">
<echo level="Warning" message="" />
<echo level="Warning" message="====================" />
<echo level="Warning" message="${project::get-name()}" />
<echo level="Warning" message="====================" />
<call target="prepare" if="${target::exists('prepare')}" />
<customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
<customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
<call target="run_normal_tasks" if="${not is.replaced}" />
<customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
</target>
<target name="run_normal_tasks"
depends="get_test_dlls, ncover, ncover_explorer"
description="Using NCover to Analyze project for test quality indicators."
if="${file::exists(app.ncover) and test.framework !='none'}" />
<target name="prepare">
<echo level="Warning" message="Removing and adding ${dirs.ncover_results}."/>
<delete dir="${dirs.ncover_results}" failonerror="false" />
<mkdir dir="${dirs.ncover_results}" />
</target>
<target name="get_test_dlls">
<echo level="Warning" message="Getting test dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
<property name="dll.names" value="" />
<foreach item="File" property="dll.filename">
<in>
<items>
<exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*Database*dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*.Integration*dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Spec*dll" />
</items>
</in>
<do>
<property name="dll.names" value="${dll.names + ' ' + string::replace(string::replace(dll.filename,path::get-full-path(dirs.build.code) + '\',''),'\',path.separator) + ''}" />
</do>
</foreach>
<property name="dlls.test" value="${dll.names}" />
<echo level="Warning" message="Running NCover against these test dlls - ${dlls.test}." />
<property name="args.test_runner" value="${dlls.test} ${test.args}" />
</target>
<target name="ncover" if="${file::exists(app.ncover) and file::exists(app.ncover.tester)}" >
<echo level="Warning" message="Attempting to run NCover. Creating file at ${file.ncover_results} and logging at ${file.ncover_log}." />
<ncover program="${app.ncover}"
commandLineExe="${app.ncover.tester}"
commandLineArgs="${args.test_runner}"
workingDirectory="${dirs.build.code}"
coverageFile="${file.ncover_results}"
logLevel="Normal"
logFile="${file.ncover_log}"
excludeAttributes="CoverageExcludeAttribute"
failonerror="false"
verbose="true">
<assemblies basedir="${dirs.build.code}">
<exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*Spec*dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}${project.name}*.dll" />
</assemblies>
</ncover>
</target>
<target name="ncover_explorer" depends="ncover" if="${file::exists(app.ncover.explorer)}" >
<echo level="Warning" message="Attempting to run NCoverExplorer. Creating HTML results file at ${file.html.code_coverage_results} and XML results file at ${file.xml.code_coverage_results}." />
<ncoverexplorer
program="${app.ncover.explorer}"
projectName="${project.name}"
reportType="4"
outputDir="${dirs.ncover_results}"
xmlReportName="${file.xml.code_coverage_results}"
htmlReportName="${file.html.code_coverage_results}"
showExcluded="True"
satisfactoryCoverage="${number.satisfactory_coverage}"
failMinimum="false"
failonerror="false"
>
<fileset>
<include name="${file.ncover_results}" />
</fileset>
<exclusions>
<exclusion enabled="true" isRegex="false" pattern="*Test*" type="Assembly" />
<exclusion enabled="true" isRegex="false" pattern="*Spec*" type="Assembly" />
<exclusion enabled="true" isRegex="false" pattern="*Test*" type="Namespace" />
<exclusion enabled="true" isRegex="false" pattern="*.My*" type="Namespace" />
<exclusion enabled="true" isRegex="false" pattern="*.bdd*" type="Namespace" />
<exclusion enabled="true" isRegex="false" pattern="when*" type="Class" />
<exclusion enabled="true" isRegex="false" pattern="concern*" type="Class" />
</exclusions>
</ncoverexplorer>
</target>
<target name="open_results">
<echo level="Warning" message="Opening results - ${path::get-full-path(dirs.ncover_results) + path.separator + file.html.code_coverage_results}" />
<results display="${path::get-full-path(dirs.ncover_results) + path.separator + file.html.code_coverage_results}" />
</target>
</project>
@@ -32,6 +32,7 @@
<property name="test.args" value="${nunit.separator}xml=&quot;${dirs.test_results}${path.separator}nunit-results.xml&quot; ${nunit.separator}nologo ${test.args.framework}" />
<property name="test.args.exclude" value="${nunit.separator}exclude=&quot;${tests.excluded_categories.comma_separated}&quot;" />
<property name="app.nunit.console" value="${path::get-full-path(dirs.lib)}${path.separator}NUnit${path.separator}nunit-console.exe" overwrite="false" if="${platform::is-windows()}" />
<property name="app.nunit.console" value="${path::get-full-path(dirs.lib)}${path.separator}NUnit${path.separator}nunit-console-x86.exe" overwrite="false" if="${platform::is-windows() and uppercut::is-os64bit() and msbuild.platform=='x86'}" />
<property name="app.nunit.console" value="nunit-console" overwrite="false" if="${platform::is-unix()}"/>
<property name="dlls.test" value="" />
<property name="tests.ran" value="false" />
Oops, something went wrong.

0 comments on commit 5752dc6

Please sign in to comment.