summaryrefslogtreecommitdiff
path: root/build/project.test.build
blob: 494a1707c68962b341e2cacd74b15672558713a3 (plain)
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
<?xml version="1.0" encoding="utf-8" ?>
<project name="project.test">
	<property name="test.output" value="${project.name}.test.dll" />
	<property name="xunit.cons.exe" value="${build.tools.dir}\mbunit\mbunit.cons.exe" />
	<!--<property name="xunit.cons.exe" value="${build.tools.dir}\gallio\gallio.echo.exe" />-->

	<fileset id="test.references.fileset">
		<include name="${build.lib.dir}\**\*.dll" />
	</fileset>

	<target name="test.compile" depends="init">
		<csc output="${build.compile.dir}\${test.output}" target="library" debug="${debug}">
			<sources basedir="${src.dir}">
				<include name="**\*.cs" />
			</sources>
			<references refid="test.references.fileset"/>
		</csc>
	</target>

	<target name="test.copy.dependencies">
		<copy todir="${build.compile.dir}" flatten="true">
			<fileset basedir="${build.lib.dir}">
				<include name="\**\*.dll" />
			</fileset>
		</copy>
	</target>

	<target name="test" depends="test.compile, test.copy.dependencies">
		<exec program="${xunit.cons.exe}" commandline="${build.compile.dir}\${test.output} /sr /rt:text" />
	</target>

	<target name="test.html" depends="test.compile, test.copy.dependencies">
		<exec program="${xunit.cons.exe}" commandline="${build.compile.dir}\${test.output} /sr /rt:html" />
	</target>

</project>