-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnme.build
58 lines (51 loc) · 1.66 KB
/
Unme.build
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
<?xml version="1.0"?>
<project default="all">
<property name ="path.lib" value="lib" />
<property name="path.framework" value="${environment::get-variable('SYSTEMROOT')}\Microsoft.NET\Framework\v3.5" />
<property name="path.mbunit.tasks" value="${path.lib}\MbUnit\MbUnit.Tasks.dll" />
<property name="path.output" value="build" />
<target name="all" depends="clean, build, run-unit-tests" />
<target name="build">
<exec program="${path.framework}\msbuild.exe" failonerror="true">
<arg value="src\Unme.sln"/>
<arg line="/p:Configuration=Release"/>
</exec>
</target>
<target name="clean">
<foreach item="Folder" property="foldername">
<in>
<items basedir="src">
<include name="*"></include>
<exclude name="."></exclude>
</items>
</in>
<do>
<delete dir="${foldername}\bin" />
<delete dir="${foldername}\obj" />
</do>
</foreach>
<delete dir="${path.output}" />
</target>
<target name="run-unit-tests" depends="">
<loadtasks assembly="${path.mbunit.tasks}"/>
<foreach item="Folder" property="foldername">
<in>
<items basedir="src">
<include name="*.Tests"></include>
<exclude name="."></exclude>
</items>
</in>
<do>
<mbunit
report-types="Xml"
report-filename-format="${foldername}.UnitTests"
report-output-directory="${path.output}"
failonerror="true">
<assemblies>
<include name="${foldername}\bin\Release\${path::get-file-name(foldername)}.dll" />
</assemblies>
</mbunit>
</do>
</foreach>
</target>
</project>