-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
88 lines (72 loc) · 2.73 KB
/
build.xml
File metadata and controls
88 lines (72 loc) · 2.73 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name ="SVM" default="all" basedir=".">
<description>
Incremental Support Vector Machine on FPGA
</description>
<!-- Directory Name -->
<property name="bin.dir" location="bin"/>
<property name="report.dir" location="report"/>
<!-- Environment -->
<property environment="env"/>
<!-- MaxjCompiler -->
<taskdef name="MaxCompiler" classname="org.eclipse.jdt.core.ant.taskdef.MaxjTask" classpath="${env.MAXCOMPILERDIR}/lib/MaxIDE/ecj.jar" onerror="ignore"/>
<condition property="maxeda.classpath" value="${env.MAXCOMPILERJCP}">
<isset property="env.MAXCOMPILERJCP"/>
</condition>
<condition property="maxeda.classpath" value="${env.MAXCOMPILERDIR}/lib/MaxCompiler.jar">
<not><isset property="env.MAXCOMPILERJCP"/></not>
</condition>
<path id="main.classpath">
<pathelement location="${maxeda.classpath}"/>
</path>
<path id="test.classpath">
<path refid="main.classpath"/>
<pathelement location="${env.MAXCOMPILERDIR}/lib/MaxIDE/plugins/org.junit4/junit.jar"/>
<pathelement location="${env.MAXCOMPILERDIR}/lib/MaxIDE/plugins/org.hamcrest.core_1.1.0.v20090501071000.jar"/>
<pathelement location="${bin.dir}"/>
</path>
<!-- Target: all -->
<target name="all" depends="build, build-test, test"/>
<!-- Target: build -->
<target name="build" depends="clean">
<echo>
Using maxeda classpath '${maxeda.classpath}'
(Precedence: 1. $MAXCOMPILERJCP, 2. $MAXCOMPILERDIR)
</echo>
<mkdir dir="${bin.dir}"/>
<MaxCompiler srcdir="src" destdir="${bin.dir}" debug="true" failonerror="true" debuglevel="lines,vars,source" source="1.6" target="1.6">
<classpath refid="main.classpath"/>
</MaxCompiler>
</target>
<!-- Target: build-test -->
<target name="build-test" depends="build">
<echo>
Using maxeda classpath '${maxeda.classpath}'
(Precedence: 1. $MAXCOMPILERJCP, 2. $MAXCOMPILERDIR)
</echo>
<mkdir dir="${bin.dir}"/>
<MaxCompiler srcdir="test" destdir="${bin.dir}" debug="true" failonerror="true" debuglevel="lines,vars,source" source="1.6" target="1.6">
<classpath refid="test.classpath"/>
</MaxCompiler>
</target>
<!-- Target: test -->
<target name="test" depends="build-test">
<mkdir dir="${report.dir}"/>
<junit haltonfailure="no" failureproperty="junit.failed">
<classpath refid="test.classpath"/>
<formatter type="plain" usefile="false"/>
<formatter type="xml"/>
<batchtest todir="${report.dir}">
<fileset dir="${bin.dir}" includes="**/*Test.class"/>
</batchtest>
</junit>
<fail message="A JUnit test FAILED" if="junit.failed"/>
</target>
<!-- Target: clean -->
<target name="clean">
<delete dir="${bin.dir}"/>
<delete dir="${report.dir}"/>
<delete dir="dataBlockTest"/>
<delete dir="SimpleDataTest"/>
</target>
</project>