|
16 | 16 | <target name="init" depends="common.init" description="Initializes build properties" /> |
17 | 17 |
|
18 | 18 | <target name="prepare-build-directory" depends="init"> |
19 | | - <mkdir dir="${bin.dir}" /> |
20 | 19 | <mkdir dir="${testresults.dir}" /> |
21 | 20 | </target> |
22 | 21 |
|
|
33 | 32 | <exec program="dotnet" verbose="true"> |
34 | 33 | <arg value="msbuild" /> |
35 | 34 | <arg value="${root.dir}/src/NHibernate.sln" /> |
36 | | - <arg value="/p:OutputPath="${path::get-full-path(bin.dir)}"" /> |
37 | 35 | <arg value="/p:Platform="Any CPU"" /> |
38 | | - <arg value="/p:Configuration="Debug"" if="${project.config == 'debug'}" /> |
39 | | - <arg value="/p:Configuration="Release"" if="${project.config == 'release'}" /> |
| 36 | + <arg value="/p:Configuration="${build.config}""/> |
40 | 37 | <arg value="/p:GeneratePackageOnBuild="True"" /> |
41 | 38 | <arg value="/p:IncludeSymbols="True"" /> |
42 | 39 | <arg value="/p:IncludeSource="True"" /> |
|
76 | 73 | program="${async-generator-console}" /> |
77 | 74 | </target> |
78 | 75 |
|
79 | | - <target name="test-report" if="${nunit2report.installed}"> |
80 | | - <mkdir dir="${build.dir}/testresults" /> |
81 | | - <nunit2report out="${build.dir}/testresults/index.html" format="Frames" todir="${build.dir}/testresults"> |
82 | | - <fileset> |
83 | | - <include name="${bin.dir}/*results.xml" /> |
84 | | - </fileset> |
85 | | - </nunit2report> |
86 | | - </target> |
87 | | - |
88 | 76 | <target name="put-connection-settings-into-defined-app-config"> |
89 | 77 |
|
90 | 78 | <!-- make sure the config file is writable --> |
|
156 | 144 | </target> |
157 | 145 |
|
158 | 146 | <target name="put-connection-settings-into-app-config"> |
159 | | - <property name="app.config" value="${bin.dir}/${test.file}.dll.config" /> |
| 147 | + <property name="app.config" value="src/${test.file}/bin/${build.config}/net461/${test.file}.dll.config" /> |
160 | 148 | <call target="put-connection-settings-into-defined-app-config" /> |
161 | 149 | </target> |
162 | 150 |
|
|
166 | 154 | <property name="nunit-console" value="${nuget-package-path}/tools/nunit3-console.exe" /> |
167 | 155 | </target> |
168 | 156 |
|
169 | | - <target name="run-tests" depends="find-nunit" |
170 | | - description="Run NUnit tests"> |
171 | | - <property name="run-tests.failonerror" value="${not property::exists(test.file + '.IgnoreFail')}"/> |
172 | | - <property name="run-tests.x86" value="--x86" unless="${property::exists('nunit-x64')}" /> |
173 | | - <property name="run-tests.x86" value="" if="${property::exists('nunit-x64')}" /> |
174 | | - <property name="run-tests.teamcity" value="--teamcity" if="${property::exists('config.teamcity')}" /> |
175 | | - <property name="run-tests.teamcity" value="" unless="${property::exists('run-tests.teamcity')}" /> |
176 | | - <exec program="${nunit-console}" failonerror="${run-tests.failonerror}"> |
177 | | - <arg line="${bin.dir}/${test.file}.dll --result=${testresults.dir}/${test.file}.dll-results.xml;format=nunit2 --framework=${framework::get-target-framework()} ${run-tests.teamcity} ${run-tests.x86}" /> |
| 157 | + <target name="run-tests" depends="find-nunit" description="Run NUnit tests"> |
| 158 | + <exec program="${nunit-console}" failonerror="${not property::exists(test.file + '.IgnoreFail')}"> |
| 159 | + <arg value="${root.dir}/src/${test.file}/bin/${build.config}/net461/${test.file}.dll" /> |
| 160 | + <arg value="--result=${testresults.dir}/${test.file}.dll-results.xml;format=nunit2" /> |
| 161 | + <arg value="--teamcity" if="${property::exists('config.teamcity')}" /> |
| 162 | + <arg value="--x86" unless="${property::exists('nunit-x64')}" /> |
178 | 163 | </exec> |
179 | 164 | </target> |
180 | 165 |
|
181 | 166 | <target name="remove-connection-settings-from-app-config"> |
182 | | - <property name="app.config" value="${bin.dir}/${test.file}.dll.config" /> |
| 167 | + <property name="app.config" value="${root.dir}/src/${test.file}/bin/${build.config}/net461/${test.file}.dll.config" /> |
183 | 168 |
|
184 | 169 | <xmlpoke |
185 | 170 | file="${app.config}" |
|
222 | 207 | <call target="build" /> |
223 | 208 | </target> |
224 | 209 |
|
225 | | - <target name="reports" depends="init"> |
226 | | - <call target="test-all-frameworks" /> |
227 | | - <call target="test-report" /> |
228 | | - <call target="coverage-report" /> |
229 | | - </target> |
230 | | - |
231 | 210 | <target name="sources-zip" depends="init"> |
232 | 211 | <exec program="git" commandline="archive HEAD --format zip --output "${build.dir}/NHibernate-${project.version}-src.zip""/> |
233 | 212 | </target> |
|
255 | 234 |
|
256 | 235 | <!--Configuration templates--> |
257 | 236 | <copy todir="${bin-pack.conf-template}"> |
258 | | - <fileset basedir="src/NHibernate.Config.Templates"> |
| 237 | + <fileset basedir="${root.dir}/src/NHibernate.Config.Templates"> |
259 | 238 | <include name="*"/> |
260 | 239 | </fileset> |
261 | 240 | </copy> |
262 | 241 |
|
263 | 242 | <!--Minimal Required Bins--> |
264 | 243 | <copy todir="${bin-pack.required}"> |
265 | | - <fileset basedir="src/NHibernate"> |
| 244 | + <fileset basedir="${root.dir}/src/NHibernate"> |
266 | 245 | <include name="*.xsd" /> |
267 | 246 | </fileset> |
268 | 247 | </copy> |
269 | 248 | <copy todir="${bin-pack.required}"> |
270 | | - <fileset basedir="${bin.dir}"> |
| 249 | + <fileset basedir="${root.dir}/src/NHibernate/bin/${build.config}/net461/"> |
271 | 250 | <include name="Antlr3.Runtime.???" /> |
272 | 251 | <include name="Iesi.Collections.???" /> |
273 | 252 | <include name="NHibernate.???" /> |
274 | 253 | <include name="Remotion.Linq.???" /> |
275 | 254 | <include name="Remotion.Linq.EagerFetching.???" /> |
276 | 255 | </fileset> |
277 | 256 | </copy> |
278 | | - <!--Required Bins for lazy loading NHibernate.ByteCode.Castle.dll--> |
279 | 257 | <!-- Tests --> |
280 | | - <copy file="${bin.dir}/TestEmbeddedConfig.cfg.xml" todir="${bin-pack.tests}"/> |
281 | | - <copy file="${bin.dir}/ABC.hbm.xml" todir="${bin-pack.tests}"/> |
| 258 | + <copy file="${root.dir}/src/NHibernate.Test/TestEmbeddedConfig.cfg.xml" todir="${bin-pack.tests}"/> |
| 259 | + <copy file="${root.dir}/src/NHibernate.DomainModel/ABC.hbm.xml" todir="${bin-pack.tests}"/> |
282 | 260 | <copy todir="${bin-pack.tests}/DbScripts"> |
283 | 261 | <fileset basedir="${root.dir}/src/NHibernate.Test/DbScripts"> |
284 | 262 | <include name="*.sql" /> |
285 | 263 | </fileset> |
286 | 264 | </copy> |
287 | 265 | <copy todir="${bin-pack.tests}"> |
288 | | - <fileset basedir="${bin.dir}"> |
289 | | - <include name="nunit*" /> |
290 | | - <include name="SharpTestsEx*" /> |
291 | | - <include name="NHibernate.Domain*" /> |
292 | | - <include name="NHibernate.Test*" /> |
| 266 | + <fileset basedir="${root.dir}/src/NHibernate.Test/bin/${build.config}/net461"> |
293 | 267 | <include name="log4net*" /> |
| 268 | + <include name="NHibernate.DomainModel.*" /> |
| 269 | + <include name="NHibernate.Test.*" /> |
| 270 | + <include name="nunit*" /> |
| 271 | + </fileset> |
| 272 | + </copy> |
| 273 | + <copy todir="${bin-pack.tests}"> |
| 274 | + <fileset basedir="${root.dir}/src/NHibernate.Test.VisualBasic/bin/${build.config}/net461"> |
| 275 | + <include name="NHibernate.Test.VisualBasic.*" /> |
| 276 | + </fileset> |
| 277 | + </copy> |
| 278 | + <copy todir="${bin-pack.tests}"> |
| 279 | + <fileset basedir="${root.dir}/src/NHibernate.TestDatabaseSetup/bin/${build.config}/net461"> |
| 280 | + <include name="NHibernate.TestDatabaseSetup.*" /> |
294 | 281 | </fileset> |
295 | 282 | </copy> |
296 | 283 | </target> |
|
0 commit comments