forked from alevy/donut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
85 lines (74 loc) · 2.85 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<project name="distributed-fs" default="build" basedir=".">
<description>Distributed FS</description>
<property name="src" value="src"/>
<property name="src.tests.unit" value="test/unit"/>
<property name="src.tests.integration" value="test/integration"/>
<property name="build" value="bin"/>
<property name="lib" value="lib"/>
<property name="thrift-rb" value="gen-rb"/>
<property name="thrift-java" value="gen-javabean"/>
<property name="reports.test" value="test_reports"/>
<property environment="env"/>
<path id="project.class.path">
<pathelement path="${build}"/>
<fileset dir="${lib}">
<filename name="*.jar"/>
</fileset>
</path>
<target name="gen-thrift">
<echo message="Generating thrift sources"/>
<exec executable="thrift" failonerror="true">
<arg line="-gen rb -gen java:beans,hashcode"/>
<arg file="thrift/node.thrift"/>
</exec>
</target>
<target name="init">
<tstamp />
<mkdir dir="${build}"/>
</target>
<target name="build" depends="gen-thrift,init">
<javac destdir="${build}" classpathref="project.class.path" source="1.5" failonerror="true">
<src path="${src}"/>
<src path="${thrift-java}"/>
<src path="${src.tests.unit}"/>
<src path="${src.tests.integration}"/>
</javac>
</target>
<target name="clean">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${thrift-java}"/>
<fileset dir="${thrift-rb}"/>
<fileset dir="${build}"/>
</delete>
</target>
<target name="unit-tests" depends="build">
<mkdir dir="${reports.test}"/>
<junit printsummary="yes" haltonfailure="yes">
<classpath refid="project.class.path"/>
<formatter type="xml"/>
<batchtest todir="${reports.test}">
<fileset dir="${src.tests.unit}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="integration-tests" depends="build">
<mkdir dir="${reports.test}"/>
<junit printsummary="yes" haltonfailure="yes">
<classpath refid="project.class.path"/>
<formatter type="xml"/>
<batchtest todir="${reports.test}">
<fileset dir="${src.tests.integration}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="test" depends="unit-tests, integration-tests"/>
<target name="TestDonut" depends="build">
<java classname="edu.washington.cs.cse490h.donut.TestDonut" failonerror="true" fork="true">
<classpath refid="project.class.path"/>
</java>
</target>
</project>