fixing buidl to only report coverage on .NET 4 build
This commit is contained in:
27
Spring.build
27
Spring.build
@@ -132,7 +132,7 @@ Commandline Examples:
|
||||
<property name="project.build.package" value="false"/>
|
||||
<property name="project.build.sign" value="false" overwrite="false" />
|
||||
|
||||
<property name="test.withcoverage" value="false" />
|
||||
<property name="test.withcoverage" value="false" overwrite="true" />
|
||||
|
||||
<!-- import non-redistributables if available -->
|
||||
<!-- to build certain libraries (e.g. Spring.Messaging.Ems), 3rd party libraries are required
|
||||
@@ -523,6 +523,9 @@ Commandline Examples:
|
||||
|
||||
<target name="compile-net-2.0" description="Builds .NET Framework 2.0 version"
|
||||
depends="set-net-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir">
|
||||
|
||||
<property name="test.withcoverage" value="false" overwrite="true"/>
|
||||
|
||||
<if test="${property::exists('mstest.exe')}">
|
||||
<property name="mstest.exe.current" value="${string::replace(property::get-value('mstest.exe'), 'Microsoft Visual Studio 10.0', 'Microsoft Visual Studio 9.0')}" />
|
||||
</if>
|
||||
@@ -536,7 +539,10 @@ Commandline Examples:
|
||||
|
||||
<target name="compile-net-3.0" description="Builds .NET Framework 3.0 version"
|
||||
depends="set-net-3.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir">
|
||||
<call target="copykeys" if="${project.build.sign}"/>
|
||||
|
||||
<property name="test.withcoverage" value="false" overwrite="true"/>
|
||||
|
||||
<call target="copykeys" if="${project.build.sign}"/>
|
||||
<call target="common.generate-assemblyinfo"/>
|
||||
<property name="build-ems" value="false" overwrite="true" />
|
||||
<property name="build-nms" value="false" overwrite="true" />
|
||||
@@ -555,6 +561,9 @@ Commandline Examples:
|
||||
|
||||
<target name="compile-net-3.5" description="Builds .NET Framework 3.5 version"
|
||||
depends="set-net-3.5-runtime-configuration, check-spring-basedir, clean-current-bin-dir">
|
||||
|
||||
<property name="test.withcoverage" value="false" overwrite="true"/>
|
||||
|
||||
<property name="lib.dir" value="${spring.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
|
||||
<property name="nh30.lib.dir" value="${spring.basedir}/lib/NHibernate30/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
|
||||
<property name="nh31.lib.dir" value="${spring.basedir}/lib/NHibernate31/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
|
||||
@@ -588,7 +597,7 @@ Commandline Examples:
|
||||
<target name="compile-net-4.0" description="Builds .NET Framework 4.0 version"
|
||||
depends="set-net-4.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir">
|
||||
|
||||
<property name="test.withcoverage" value="true"/>
|
||||
<property name="test.withcoverage" value="true" overwrite="true"/>
|
||||
|
||||
<if test="${property::exists('mstest.exe')}">
|
||||
<property name="mstest.exe.current" value="${string::replace(property::get-value('mstest.exe'), 'Microsoft Visual Studio 9.0', 'Microsoft Visual Studio 10.0')}" />
|
||||
@@ -607,20 +616,8 @@ Commandline Examples:
|
||||
<property name="build-msmq-tests" value="true" overwrite="true" />
|
||||
<property name="build-velocity" value="true" overwrite="true" />
|
||||
<call target="compile-test" />
|
||||
|
||||
<call target="GenerateCoverageReport" />
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<target name="GenerateCoverageReport" >
|
||||
<exec program="${tool.dir}\ReporterGenerator\bin\ReportGenerator.exe" workingdir="${spring.basedir}\build\net\4.0\debug" verbose="true">
|
||||
<!-- <arg path="${spring.basedir}\build\net\4.0\debug\Spring.Core.Tests.dll-TestCoverage.xml" /> -->
|
||||
<arg value="Spring.Aop.Tests.dll-TestCoverage.xml;Spring.Core.Tests.dll-TestCoverage.xml;Spring.Data.NHibernate30.Tests.dll-TestCoverage.xml;Spring.Data.NHibernate31.Tests.dll-TestCoverage.xml;Spring.Data.NHibernate32.Tests.dll-TestCoverage.xml;Spring.Data.Tests.dll-TestCoverage.xml;Spring.Messaging.Nms.Tests.dll-TestCoverage.xml;Spring.Template.Velocity.Tests.dll-TestCoverage.xml;Spring.Testing.NUnit.Tests.dll-TestCoverage.xml;Spring.Web.Mvc.Tests.dll-TestCoverage.xml;Spring.Web.Mvc3.Tests.dll-TestCoverage.xml;Spring.Web.Tests.dll-TestCoverage.xml" />
|
||||
<arg path="${spring.basedir}\build\net\4.0\debug\CoverageReport" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="compile-mono-2.0" description="Builds MONO Framework 2.0 version"
|
||||
depends="set-mono-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir">
|
||||
<call target="copykeys" if="${project.build.sign}"/>
|
||||
|
||||
@@ -184,14 +184,15 @@ ${project.name} : (optional), the name of the assembly
|
||||
${tool.dir} : dir for tools
|
||||
-->
|
||||
<target name="common.run-tests">
|
||||
|
||||
<if test="${not test.withcoverage}" >
|
||||
<call target="common.run-tests.nunit" />
|
||||
</if>
|
||||
|
||||
<if test="${test.withcoverage}" >
|
||||
<call target="common.run-tests.opencover" />
|
||||
</if>
|
||||
|
||||
<if test="${not test.withcoverage}" >
|
||||
<call target="common.run-tests.nunit" />
|
||||
</if>
|
||||
<property name="test.withcoverage" value="false"/>
|
||||
</target>
|
||||
|
||||
<!--
|
||||
@@ -316,6 +317,11 @@ ${tool.dir} : dir for tools
|
||||
<arg value="-filter:"+[Spring*]* -[*Test*]* -[*nunit*]*"" />
|
||||
<arg value="-output:${test.bin.dir}/${test.assemblyname}.dll-TestCoverage.xml" />
|
||||
</exec>
|
||||
|
||||
<exec program="${tool.dir}\ReporterGenerator\bin\ReportGenerator.exe" workingdir="${test.bin.dir}" verbose="true">
|
||||
<arg value="${test.assemblyname}.dll-TestCoverage.xml" />
|
||||
<arg path="${test.bin.dir}\CoverageReport\${test.assemblyname}" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user