-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
58 lines (42 loc) · 1.89 KB
/
build.xml
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
<project>
<property name="src.java.dir" location="./src/pc_masterrace"/>
<property name="src.test.dir" location="./src/pc_masterrace_test"/>
<property name="result.dir" location="./res"/>
<property name="result.javaclasses.dir" location="${result.dir}/classes"/>
<property name="result.testclasses.dir" location="${result.dir}/testclasses"/>
<path id="Lib">
<pathelement location="./Lib/junit-4.13.jar"/>
<!--matcher-->
<pathelement location="./Lib/hamcrest-core-1.3.jar"/>
</path>
<target name="compile">
<mkdir dir="${result.javaclasses.dir}"/>
<javac srcdir="${src.java.dir}" destdir="${result.javaclasses.dir}" debug="true" includeantruntime="false">
</javac>
</target>
<target name="compile-testcases" depends="compile">
<mkdir dir="${result.testclasses.dir}"/>
<javac srcdir="${src.test.dir}" destdir="${result.testclasses.dir}" debug="true" includeantruntime="false">
<classpath>
<path refid="Lib"/>
<pathelement location="${result.javaclasses.dir}"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile-testcases">
<!--fork : each test will run in its own JVM (to seperate test cases)-->
<junit printsummary="true" haltonfailure="true" fork="true">
<classpath>
<path refid="Lib"></path>
<pathelement location="${result.javaclasses.dir}"/>
<pathelement location="${result.testclasses.dir}"/>
</classpath>
<formatter type="brief" usefile="false"/>
<batchtest >
<fileset dir="${result.testclasses.dir}" >
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
</project>