2
2
<project name="NUnit" default="help" basedir=".">
4
4
<!-- ***************************************************************** -->
5
<!-- This script has been tested using NAnt 0.85. At least -->
5
<!-- This script has been tested using NAnt 0.92. At least -->
6
6
<!-- one of the supported runtimes and sdk must be installed. In -->
7
7
<!-- order to build the msi, WiX 2.0 and the WiX tasks for NAnt -->
8
8
<!-- are required. To run the test coverage target, NCover is -->
10
10
<!-- ***************************************************************** -->
11
<!-- TODO: Edit above to reflect actual targets -->
12
13
<!-- ***************************************************************** -->
13
14
<!-- *** Default Help Target *** -->
16
17
<target name="help">
18
This build file will build NUnitLite for any of the supported
19
runtime frameworks which are actually installed. To add or
20
support for a framework, edit this script
19
This build file will build NUnitLite for any of the supported
20
runtime frameworks which are actually installed. To add support
21
for a framework, edit this script
22
Running on the current system, the following runtime frameworks
23
are available for building and testing NUnit:
23
Running on the current system, the following runtime frameworks
24
are available for building and testing NUnit:
26
27
<foreach item="String" delim=","
27
28
property="framework" in="${installed.frameworks}">
28
<echo message=" ${string::pad-right(framework,15,' ')}${framework::get-description(framework)}"/>
29
<echo message=" ${string::pad-right(framework,18,' ')}${framework::get-description(framework)}"/>
32
Note that targets that set the build configuration or runtime
33
to be used must come before action targets. For example:
35
nant net-2.0 release build
37
nant debug clean build
39
Use nant -projecthelp to see a full list of targets.
33
Note that targets that set the build configuration or runtime
34
to be used must come before action targets. For example:
36
nant net-2.0 release build
38
nant debug clean build
40
Use nant -projecthelp to see a full list of targets.
69
70
<!-- Additional internal properties are set in the include file -->
70
71
<include buildfile="nunitlite.build.include"/>
72
74
<!-- ***************************************************************** -->
73
75
<!-- *** Targets that set the build configuration *** -->
74
76
<!-- *** These must come before actions like build or test *** -->
146
148
<target name="clean" depends="set-build-dir"
147
149
description="Removes the current build directory">
149
<nant target="clean">
150
<buildfiles refid="project.buildfiles"/>
151
<property name="current.target" value="clean"/>
152
<call target="run-subprojects"/>
187
188
<property name="nant.settings.currentframework" value="${build.framework}"/>
189
<nant target="build">
190
<buildfiles refid="project.buildfiles"/>
190
<property name="current.target" value="build"/>
191
<call target="run-subprojects"/>
195
195
<target name="build-all"
196
description="Build current config for all available runtime">
196
description="Build current config for all available runtimes">
197
197
<foreach item="String" delim=","
198
198
property="framework" in="${installed.frameworks}">
199
199
<call target="set-${framework}-runtime-config"/>
240
<target name="ci-test" depends="build"
241
description="Build and run CI test (no gui) for selected config and runtime">
243
<call target="run-test" unless="${runtime.platform == 'silverlight'}"/>
244
<call target="run-silverlight-ci-test" if="${runtime.platform == 'silverlight'}"/>
241
248
<target name="run-test"
242
249
description="Run tests for selected config and runtime (no rebuild)">
279
<target name="run-silverlight-ci-test">
282
<echo message="* Testing ${runtime.config} ${build.config} build"/>
285
<exec basedir="${current.build.dir}"
286
workingdir="${current.build.dir}"
287
program="ci-test-runner.exe"
288
commandline="nunitlite.tests"
272
293
<target name="test-all"
273
294
description="Build and test all runtimes for current config">
363
<!-- ***************************************************************** -->
364
<!-- *** Fileset listing subproject build files *** -->
365
<!-- ***************************************************************** -->
367
<fileset id="project.buildfiles" >
368
<include name="src/framework/nunitlite.framework.build" asis="true"/>
369
<include name="src/mock-assembly/mock-assembly.build" asis="true"/>
370
<include name="src/testdata/nunitlite.testdata.build" asis="true"/>
371
<include name="src/tests/nunitlite.tests.build" asis="true"/>