forked from spring-attic/spring-net-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpring.Integration.build
More file actions
235 lines (203 loc) · 9.84 KB
/
Copy pathSpring.Integration.build
File metadata and controls
235 lines (203 loc) · 9.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?xml version="1.0" ?>
<project name="Spring.Integration" default="test">
<property name="root.dir" value="${project::get-base-directory()}" overwrite="false" />
<property name="deploy.dir" value="${root.dir}/../deploy" />
<property name="build.dir" value="${root.dir}/build" />
<property name="tool.dir" value="${root.dir}/tools" />
<property name="lib.dir" value="${root.dir}/lib" />
<readregistry property="net35.install.dir" key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\InstallPath" hive="LocalMachine" failonerror="true"/>
<property name="msbuild.exe" value="${net35.install.dir}\msbuild.exe"/>
<property name="thirdparty.libs.spring" value="C:\sourceforge\Spring.NET\trunk\build\net\2.0\debug" />
<!-- readregistry property="vs2008.install.dir" key="SOFTWARE\Microsoft\VisualStudio\9.0\InstallDir" hive="LocalMachine" failonerror="false"/ -->
<property name="buildconfiguration" value="Debug" />
<!-- force net-3.5 -->
<!-- <property name="nant.settings.currentframework" value="net-3.5"/>-->
<target name="update-dependencies">
<copy todir="${lib.dir}/net/2.0">
<fileset basedir="${thirdparty.libs.spring}">
<include name="Spring.*.dll"/>
<include name="Spring.*.pdb"/>
<exclude name="Spring.Data.NHibernate12.???" />
<exclude name="Spring.Data.NHibernate20.???" />
<exclude name="*.Tests.???" />
<exclude name="*.Tests.Integration.???" />
</fileset>
</copy>
</target>
<target name="build" depends="clean">
<call target="RebuildAllSolutions" />
</target>
<target name="test" depends="build">
<call target="TestAllAssemblies" />
</target>
<target name="test-integration" depends="test">
<delete>
<fileset basedir="${build.dir}">
<include name="*.dll-TestCoverage.xml" />
</fileset>
</delete>
<call target="IntegrationTestAllAssemblies" />
</target>
<target name="daily" depends="test">
</target>
<target name="clean">
<delete dir="${build.dir}" />
<foreach item="Folder" property="dirname">
<in>
<items basedir="${root.dir}">
<exclude name="tools/**" />
<include name="src/**/bin" />
<include name="test/**/bin" />
<include name="**/obj" />
<include name="**/PreCompiledWeb" />
</items>
</in>
<do>
<delete dir="${dirname}" />
</do>
</foreach>
</target>
<target name="common.run-tests">
<property name="nant.settings.currentframework" value="net-2.0"/>-->
<call target="common.run-tests.nunit"/>
<!-- <call target="common.run-tests.ncover" /> -->
</target>
<!--
*******************************************************************************
Runs NUnit unit test configuration of the current ${project::get-name()}.dll
Arguments:
${build.dir}: the binary directory to pick the assembly + app.config from
${test.assemblyname} : (optional), the name of the assembly, if not specified uses "project:get-name()"
${tool.dir} : dir for tools
-->
<target name="common.run-tests.nunit">
<property name="test.assemblyname" value="${project::get-name()}" overwrite="false" />
<property name="test.assemblyfile" value="${test.assemblyname}.dll" overwrite="true" />
<!-- ..\..\..\build\VS.NET.2008\Spring.Integration\Debug\ -->
<property name="test.bin.dir"
value="${build.dir}/VS.NET.2008/${project::get-name()}.Tests/${buildconfiguration}"
if="${not property::exists('test.bin.dir')}"/>
<!-- <property name="test.bin.dir" value="${build.dir}" if="${not property::exists('test.bin.dir')}" -->
<echo message="****************************************************" />
<echo message="Unit Testing ${test.assemblyname} in ${test.bin.dir}" />
<echo message="****************************************************" />
<exec program="${tool.dir}/nunit/net-2.0/nunit-console-x86.exe" workingdir="${test.bin.dir}" verbose="true">
<arg line="${test.assemblyfile}" />
<arg value="/xml:${test.assemblyname}.dll-TestResults.xml" />
<arg value="/nologo" />
<arg value="/noshadow" />
<arg value="/framework:${nant.settings.currentframework}" />
</exec>
</target>
<!--
*******************************************************************************
Runs coverage unit test configuration of the current ${project::get-name()}.dll
Arguments:
${current.bin.dir}: the binary directory to pick the assembly + app.config from
${project.name} : (optional), the name of the assembly
${tool.dir} : dir for tools
-->
<target name="common.run-tests.ncover" description="Run NUnit tests">
<property name="test.assemblyname" value="${project::get-name()}" overwrite="false" />
<property name="test.assemblyfile" value="${test.assemblyname}.dll" overwrite="true" />
<!-- ..\..\..\build\VS.NET.2008\Spring.Integration\Debug\ -->
<property name="test.bin.dir"
value="${build.dir}/VS.NET.2008/${project::get-name()}.Tests/${buildconfiguration}"
if="${not property::exists('test.bin.dir')}"/>
<!-- <property name="test.bin.dir" value="${build.dir}" if="${not property::exists('test.bin.dir')}" -->
<echo message="Coverage Testing ${test.assemblyname} from ${test.bin.dir}/${test.assemblyfile}" />
<property name="test.assemblyname.tocover" value="${string::substring(test.assemblyname,0,string::last-index-of(test.assemblyname, '.Tests') )}" overwrite="false" />
<exec program="${tool.dir}/ncover/ncover.console.exe" workingdir="${test.bin.dir}" verbose="true">
<arg value="//q" />
<arg value="//reg" />
<arg value="//w" />
<arg path="${test.bin.dir}" />
<arg value="//x" />
<arg path="${test.bin.dir}/${test.assemblyname}.dll-TestCoverage.xml" />
<arg value="//a" />
<arg value="${test.assemblyname.tocover}" />
<arg value="//ea" />
<arg value="CoverageExcludeAttribute" />
<arg value="//q" />
<arg path="${tool.dir}/nunit/net-2.0/nunit-console-x86.exe" />
<arg line="${test.assemblyfile}" />
<arg value="/xml:${test.assemblyname}.dll-TestResults.xml" />
<arg value="/nologo" />
<arg value="/noshadow" />
<arg value="/framework:${nant.settings.currentframework}" />
</exec>
</target>
<target name="TestAllAssemblies">
<foreach item="File" property="filename">
<in>
<items basedir="${build.dir}">
<include name="**/*.Tests.dll" />
</items>
</in>
<do>
<echo message="testing ${path::get-file-name-without-extension(filename)}" />
<property name="test.assemblyname" value="${path::get-file-name-without-extension(filename)}" />
<call target="common.run-tests" />
</do>
</foreach>
<!-- build coverage summary -->
<exec program="${tool.dir}/ncoverexplorer/ncoverexplorer.console.exe" workingdir="${test.bin.dir}" failonerror="false">
<arg value="/xml:"${build.dir}/TestCoverageSummary.xml"" />
<arg value="/report:ModuleClassFunctionSummary" />
<arg value="/sort:4" />
<arg value="/minCoverage:80" />
<arg value="/q" />
<arg path="${test.bin.dir}/*-TestCoverage.xml" />
</exec>
</target>
<target name="IntegrationTestAllAssemblies">
<foreach item="File" property="filename">
<in>
<items basedir="${build.dir}">
<include name="*.Tests.Integration.dll" />
</items>
</in>
<do>
<property name="test.assemblyname" value="${path::get-file-name-without-extension(filename)}" />
<call target="common.run-tests" />
</do>
</foreach>
<!-- build coverage summary -->
<exec program="${tool.dir}/ncoverexplorer/ncoverexplorer.console.exe" workingdir="${test.bin.dir}" failonerror="false">
<arg value="/xml:"${build.dir}/TestCoverageSummary.xml"" />
<arg value="/html:"${build.dir}/TestCoverageSummary.html"" />
<arg value="/report:ModuleClassFunctionSummary" />
<arg value="/sort:4" />
<arg value="/minCoverage:80" />
<arg value="/q" />
<arg path="${test.bin.dir}/*-TestCoverage.xml" />
</exec>
</target>
<target name="RebuildAllSolutions" depends="clean">
<foreach item="File" property="filename">
<in>
<items basedir="${root.dir}">
<exclude name="tools/**" />
<exclude name="examples/**" />
<include name="**/*.sln" />
</items>
</in>
<do>
<property name="solutionfile" value="${filename}" />
<property name="solutionconfiguration" value="${buildconfiguration}" />
<call target="RebuildSolution" />
</do>
</foreach>
</target>
<target name="RebuildSolution" description="rebuilds a given solution file">
<echo message="Rebuilding Solution ${solutionfile}" />
<exec program="${msbuild.exe}">
<!--
<arg value="/property:OutDir=${output.dir}/"/>
-->
<arg value="${solutionfile}"/>
<arg line="/nologo" />
<arg line="/property:Configuration=${solutionconfiguration}"/>
</exec>
</target>
</project>