forked from wvisser/green
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
128 lines (112 loc) · 4.17 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
build.xml - The Green solver build script
Public targets:
build (default) compile classes
test run all unit tests
clean remove the files generated by the build process
package create a jar file of the project
-->
<project name="green" default="build" basedir=".">
<!--
Settings
-->
<loadproperties srcFile="build.properties"/>
<property name="output.dir" value="bin"/>
<property environment="env"/>
<property name="junit.dir" value="bin/junit"/>
<property name="jar.file" value="green.jar"/>
<property name="debuglevel" value="source,lines,vars"/>
<path id="green.classpath">
<pathelement location="${output.dir}"/>
<pathelement location="lib/apfloat.jar"/>
<pathelement location="lib/commons-exec-1.2.jar"/>
<pathelement location="lib/junit_4.8.2.jar"/>
<pathelement location="lib/org.hamcrest.core_1.1.0.jar"/>
<pathelement location="lib/choco-solver-3.3.1.jar"/>
<pathelement location="lib/slf4j-api-1.7.12.jar"/>
<pathelement location="lib/slf4j-simple-1.7.12.jar"/>
<pathelement location="lib/trove-3.1a1.jar"/>
<pathelement location="lib/choco-solver-2.1.3.jar"/>
<pathelement location="lib/libcvc3.jar"/>
<pathelement location="lib/com.microsoft.z3.jar"/>
<pathelement location="lib/jedis-2.0.0.jar"/>
</path>
<path id="green.srcpath">
<pathelement location="src"/>
<pathelement location="test"/>
</path>
<property name="green.srcpath" refid="green.srcpath"/>
<!--
Initialization
-->
<target name="init">
<mkdir dir="${output.dir}"/>
<copy file="build.properties" todir="${output.dir}"/>
<copy includeemptydirs="false" todir="${output.dir}">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy includeemptydirs="false" todir="${output.dir}">
<fileset dir="test">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<!--
TARGET: clean
-->
<target name="clean">
<delete dir="${junit.dir}"/>
<delete dir="${output.dir}"/>
<delete file="${jar.file}"/>
</target>
<!--
TARGET: build
-->
<target name="build" depends="init">
<!-- <echo message="${ant.project.name}: ${ant.file}"/> -->
<javac debug="true" debuglevel="${debuglevel}" destdir="${output.dir}" sourcepath="${green.srcpath}" source="${source}" target="${target}" bootclasspath="${bootpath}" includeantruntime="false">
<src path="src"/>
<classpath refid="green.classpath"/>
</javac>
<javac debug="true" debuglevel="${debuglevel}" destdir="${output.dir}" sourcepath="${green.srcpath}" source="${source}" target="${target}" bootclasspath="${bootpath}" includeantruntime="false">
<src path="test"/>
<classpath refid="green.classpath"/>
</javac>
</target>
<!--
TARGET: test
-->
<target name="test">
<echo message="java.library.path = ${z3lib};${cvc3lib}"/>
<mkdir dir="${junit.dir}"/>
<junit fork="yes" printsummary="withOutAndErr" haltonfailure = "yes">
<formatter type="xml" usefile="false"/>
<test name="za.ac.sun.cs.green.EntireSuite" todir="${junit.dir}"/>
<env key="DYLD_LIBRARY_PATH" value="lib"/>
<env key="LD_LIBRARY_PATH" value="lib"/>
<sysproperty key="java.library.path" value="${z3lib}:${cvc3lib}"/>
<classpath refid="green.classpath"/>
</junit>
<junitreport todir="${junit.dir}">
<fileset dir="${junit.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${junit.dir}"/>
</junitreport>
</target>
<!--
TARGET: package
-->
<target name="package">
<jar destfile="${jar.file}">
<fileset dir="${output.dir}">
<exclude name="${junit.dir}"/>
</fileset>
<fileset dir="src"/>
<fileset dir="test"/>
</jar>
</target>
</project>