~wesleycutting/nunitlite/work

« back to all changes in this revision

Viewing changes to nunitlite.build

  • Committer: Charlie Poole
  • Date: 2013-01-24 01:32:48 UTC
  • Revision ID: charlie@nunit.org-20130124013248-dh15al2hm5vcbpgl
Add CI Build target to build, using a console app to load the silverlight tests and run them

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<project name="NUnit" default="help" basedir=".">
3
3
 
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          -->
9
9
<!-- required.                                                         -->
10
10
<!-- ***************************************************************** -->
 
11
<!-- TODO: Edit above to reflect actual targets -->
11
12
 
12
13
<!-- ***************************************************************** -->
13
14
<!-- ***                 Default Help Target                       *** -->
15
16
 
16
17
<target name="help">
17
18
  <echo>
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
21
22
 
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:
24
25
  </echo>
25
26
 
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)}"/>
29
30
  </foreach>
30
31
 
31
32
  <echo>
32
 
    Note that targets that set the build configuration or runtime
33
 
    to be used must come before action targets. For example:
34
 
 
35
 
        nant net-2.0 release build
36
 
        nant build-all
37
 
        nant debug clean build
38
 
 
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:
 
35
 
 
36
    nant net-2.0 release build
 
37
    nant build-all
 
38
    nant debug clean build
 
39
 
 
40
Use   nant -projecthelp to see a full list of targets.
40
41
  </echo>
41
42
</target>
42
43
 
69
70
  <!-- Additional internal properties are set in the include file -->
70
71
  <include buildfile="nunitlite.build.include"/>
71
72
 
 
73
 
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">
148
150
 
149
 
    <nant target="clean">
150
 
      <buildfiles refid="project.buildfiles"/>
151
 
    </nant>
 
151
    <property name="current.target" value="clean"/>
 
152
    <call target="run-subprojects"/>
152
153
 
153
154
  </target>
154
155
 
186
187
 
187
188
    <property name="nant.settings.currentframework" value="${build.framework}"/>
188
189
 
189
 
    <nant target="build">
190
 
      <buildfiles refid="project.buildfiles"/>
191
 
    </nant>
 
190
    <property name="current.target" value="build"/>
 
191
    <call target="run-subprojects"/>
192
192
 
193
193
  </target>
194
194
 
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"/>
211
211
 
212
212
    <property name="nant.settings.currentframework" value="${build.framework}"/>
213
213
 
214
 
    <nant target="rebuild">
215
 
      <buildfiles refid="project.buildfiles"/>
216
 
    </nant>
 
214
    <property name="current.target" value="rebuild"/>
 
215
    <call target="run-subprojects"/>
217
216
 
218
217
  </target>
219
218
 
238
237
 
239
238
  </target>
240
239
 
 
240
  <target name="ci-test" depends="build"
 
241
    description="Build and run CI test (no gui) for selected config and runtime">
 
242
 
 
243
    <call target="run-test" unless="${runtime.platform == 'silverlight'}"/>
 
244
    <call target="run-silverlight-ci-test" if="${runtime.platform == 'silverlight'}"/>
 
245
 
 
246
  </target>
 
247
 
241
248
  <target name="run-test"
242
249
      description="Run tests for selected config and runtime (no rebuild)">
243
250
 
269
276
 
270
277
  </target>
271
278
 
 
279
  <target name="run-silverlight-ci-test">
 
280
 
 
281
    <echo message="*"/>
 
282
    <echo message="* Testing ${runtime.config} ${build.config} build"/>
 
283
    <echo message="*"/>
 
284
 
 
285
    <exec basedir="${current.build.dir}"
 
286
      workingdir="${current.build.dir}" 
 
287
      program="ci-test-runner.exe" 
 
288
      commandline="nunitlite.tests"
 
289
      managed="Strict"/>
 
290
 
 
291
  </target>
 
292
 
272
293
  <target name="test-all"
273
294
      description="Build and test all runtimes for current config">
274
295
          
360
381
 
361
382
  </target>
362
383
  
363
 
<!-- ***************************************************************** -->
364
 
<!-- ***          Fileset listing subproject build files         *** -->
365
 
<!-- ***************************************************************** -->
366
 
 
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"/>
372
 
  </fileset>
373
 
 
374
384
</project>