Permalink
Browse files

Update build to match SVN repository.

+ Seems to upgrade Uppercut from 1.4.2.423 to 1.4.2.451.
+ Seems to switch to OpenCover instead of NCover, but it doesn't include executables.
  • Loading branch information...
1 parent 4ba5339 commit 86221834b85e413dc2431e744f7fa0e4d0d7b1af @mpareja mpareja committed Mar 25, 2013
@@ -34,16 +34,21 @@
<!-- source_control_type: svn, vss, tfs, vault, git, hg -->
<property name="source_control_type" value="git" overwrite="false" />
+ <!-- cover.framework: none, ncover, opencover -->
+ <property name="cover.framework" value="opencover" overwrite="false" />
+
<!-- Environment specific variables -->
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
<!-- ASSEMBLY VARIABLES -->
<property name="version.use_semanticversioning" value="true" overwrite="false" />
<property name="version.major" value="0" overwrite="false" />
<property name="version.minor" value="8" overwrite="false" />
- <property name="version.patch" value="5" overwrite="false" />
+ <property name="version.patch" value="6" overwrite="false" />
<property name="version.gem.suffix" value="" overwrite="false" />
<property name="use.gem.build_date" value="false" overwrite="false" />
+ <property name="version.nuget.prerelease" value="alpha1" overwrite="false" />
+ <property name="version.use.build_date" value="true" overwrite="false" />
<property name="assembly.description" value="${project.name} is a product of ${company.name} - ${repository.path}." overwrite="false" />
<property name="assembly.clscompliant" value="true" overwrite="false" />
<!-- partially trusted callers doesn't set correctly with assembly generator - Leave false for now-->
@@ -70,7 +75,8 @@
<!-- These are run two folders down from the top level folder, so figure out the relative path from there and add "..\..\" -->
<!-- In example, if from the top level directory, you have an item that is in lib\NCover\NCover.Console.exe you should add it here as ..\..\lib\NCover\NCover.Console.exe -->
<!-- To not use the tool, change to a location that doesn't exist -->
- <property name="app.nunit.console" value="..${path.separator}..${path.separator}${folder.references}${path.separator}NUnit${path.separator}nunit-console.exe" overwrite="false" />
+ <property name="app.nunit.console" value="..${path.separator}..${path.separator}${folder.references}${path.separator}NUnit${path.separator}nunit-console.exe" overwrite="false" if="${platform::is-windows()}" />
+ <property name="app.nunit.console" value="nunit-console" overwrite="false" if="${platform::is-unix()}"/>
<property name="app.xunit.console" value="..${path.separator}..${path.separator}${folder.references}${path.separator}xUnit${path.separator}xunit.console.clr4.exe" overwrite="false" />
<property name="app.storevil.console" value="..${path.separator}..${path.separator}${folder.references}${path.separator}StorEvil${path.separator}StorEvil.exe" overwrite="false" />
<property name="app.ncover" value="..${path.separator}..${path.separator}${folder.references}${path.separator}NCover${path.separator}NCover.Console.exe" overwrite="false" />
@@ -79,8 +85,14 @@
<property name="app.ncover.tester" value="${app.nunit.console}" overwrite="false" if="${test.framework=='nunit'}" />
<property name="app.ncover.tester" value="${app.xunit.console}" overwrite="false" if="${test.framework=='xunit'}" />
<property name="app.ncover.tester" value="${path::get-full-path(folder.program_files)}${path.separator}Gallio${path.separator}bin${path.separator}Gallio.Host.exe" overwrite="false" if="${test.framework=='gallio'}" />
+ <property name="app.opencover" value="..${path.separator}..${path.separator}${folder.references}${path.separator}OpenCover${path.separator}OpenCover.Console.exe" overwrite="false" />
+ <property name="app.opencover.tester" value="${app.nunit.console}" overwrite="false" if="${test.framework=='nunit'}" />
+ <property name="app.opencover.tester" value="${app.xunit.console}" overwrite="false" if="${test.framework=='xunit'}" />
+ <property name="app.opencover.tester" value="${path::get-full-path(folder.program_files)}${path.separator}Gallio${path.separator}bin${path.separator}Gallio.Host.exe" overwrite="false" if="${test.framework=='gallio'}" />
<property name="app.ndepend" value="${path::get-full-path(folder.program_files)}${path.separator}NDepend${path.separator}NDepend.Console.exe" overwrite="false" />
<property name="app.metric" value="${path::get-full-path(folder.program_files)}${path.separator}Microsoft Visual Studio 10.0${path.separator}Team Tools${path.separator}Static Analysis Tools${path.separator}FxCop${path.separator}Metrics.exe" overwrite="false" />
+ <property name="app.fxcop" value="${path::get-full-path(folder.program_files)}${path.separator}Microsoft Visual Studio 10.0${path.separator}Team Tools${path.separator}Static Analysis Tools${path.separator}FxCop${path.separator}FxCopCmd.exe" />
+ <property name="app.fxcop" value="${path::get-full-path(folder.program_files)}${path.separator}Microsoft Fxcop 10.0${path.separator}FxCopCmd.exe" if="${not file::exists(app.fxcop)}" />
<property name="app.moma" value="..${path.separator}..${path.separator}${folder.references}${path.separator}MoMA${path.separator}MoMA.exe" overwrite="false" />
<property name="app.nitriq" value="Nitriq.Console.exe" overwrite="false" />
<property name="app.xbuild" value="${path::get-full-path(folder.program_files)}${path.separator}Mono-2.8${path.separator}bin${path.separator}xbuild.bat" overwrite="false" />
View
@@ -13,7 +13,7 @@ SET BUILD_DIR=%~d0%~p0%
SET NANT="%BUILD_DIR%lib\Nant\nant.exe"
SET build.config.settings="%DIR%\settings\UppercuT.config"
-%NANT% -logger:NAnt.Core.DefaultLogger -quiet /f:%BUILD_DIR%build\default.build -D:build.config.settings=%build.config.settings% %*
+%NANT% -logger:NAnt.Core.DefaultLogger -quiet /f:"%BUILD_DIR%build\default.build" -D:build.config.settings=%build.config.settings% %*
if %ERRORLEVEL% NEQ 0 goto errors
View
@@ -34,11 +34,12 @@
<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" />
+ <nant buildfile="${dirs.current.file}${path.separator}analyzers${path.separator}fxcop.step" inheritall="true" failonerror="false" />
<nant buildfile="${dirs.current.file}${path.separator}analyzers${path.separator}moma.step" inheritall="true" failonerror="false" />
</target>
-</project>
+</project>
@@ -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.file}${path.separator}..${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>
@@ -45,8 +45,8 @@
<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="====================" />
+ <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}" />
@@ -2,6 +2,9 @@
<project name="NUnitTester" default="go">
<!-- Project UppercuT - http://projectuppercut.org -->
<!-- DO NOT EDIT THIS FILE - This follows a convention for testing with Integration tests being separated from Unit tests - find out more at http://uppercut.pbwiki.com -->
+ <property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
+ <property name="path.uppercut.assembly" value="${dirs.current.file}${path.separator}..${path.separator}${file.uppercut.assembly}" />
+ <loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
<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(' ', ' '))}" />
@@ -32,6 +35,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 8622183

Please sign in to comment.