forked from rcoley93/intellij-haxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test.xml
139 lines (116 loc) · 4.67 KB
/
build-test.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
129
130
131
132
133
134
135
136
137
138
139
<project name="Idea Haxe language scripted test file" default="test" basedir=".">
<description>
Run "ant -f common.xml -projecthelp" for more complete project help.
</description>
<!-- Get the build configuration. -->
<import file="common.xml"/>
<path id="idea.classpath">
<fileset dir="${idea.ultimate.build}/lib">
<include name="*.jar"/>
</fileset>
<!-- import all the plugins jars, for example this is were
Flash and Flex plugins are located -->
<fileset dir="${idea.ultimate.build}/plugins">
<include name="**/**.jar"/>
</fileset>
</path>
<path id="classpath">
<path refid="idea.classpath"/>
</path>
<path id="classpath.test">
<pathelement location="build_test"/>
<fileset dir="${idea.ultimate.build}/lib">
<include name="**/*.jar" />
<exclude name="ant/lib/**/*.jar" />
</fileset>
<fileset dir="${java.home}/../lib">
<include name="**/*.jar" />
</fileset>
<fileset dir="${idea.ultimate.build}/plugins">
<include name="**/**.jar" />
</fileset>
</path>
<target name="clean" description="Clean Up: Remove test artifacts (build_test directory).">
<delete dir="build_test" />
</target>
<target name="init" depends="showIdeaBuild">
<tstamp/>
<mkdir dir="build_test"/>
</target>
<target name="compile_test" depends="clean,init,generateTemplatedFiles" description="Compile tests">
<!-- javac2 is an intellij ant task to wrap the java compiler and add
support to .form files and @NotNull annotations, among others -->
<taskdef name="javac2" classname="com.intellij.ant.Javac2">
<classpath>
<pathelement location="${idea.ultimate.build}/lib/javac2.jar"/>
<pathelement location="${idea.ultimate.build}/lib/forms_rt.jar"/>
<path refid="idea.classpath"/>
</classpath>
</taskdef>
<javac2
destdir="build_test"
classpathref="classpath"
verbose="false"
debug="true"
source="1.6"
target="1.6"
includeantruntime="false" >
<src path="${version.specific.code.location}" />
<src path="src/common" />
<src path="src/icons" />
<src path="gen" />
<src path="testSrc" />
<src path="testData" />
<src path="common/src" />
<src path="hxcpp-debugger-protocol" />
</javac2>
<copy toDir="build_test">
<fileset dir="src/common">
<include name="**/*.properties"/>
<include name="**/*.txt"/>
<include name="**/*.java"/>
</fileset>
<fileset dir="common/src">
<include name="**/*.properties"/>
<include name="**/*.txt"/>
<include name="**/*.java"/>
</fileset>
<fileset dir="${basedir}/resources">
<include name="*/**"/>
</fileset>
<fileset dir="gen">
<include name="META-INF/*"/>
</fileset>
</copy>
</target>
<target name="test" depends="compile_test" description="Run the tests">
<echo message="Running tests"/>
<property name="suspend" value="n"/>
<junit
haltonfailure="false"
showoutput="no"
failureProperty="failure_found"
fork="yes"
forkmode="once"
reloading="no"
enabletestlistenerevents="true">
<jvmarg value="-Didea.home.path=${idea.ultimate.build}"/>
<jvmarg value="-Xbootclasspath/a:${idea.ultimate.build}/lib/boot.jar"/>
<jvmarg value="-Dfile.encoding=UTF-8"/>
<jvmarg value="-ea"/>
<jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=43251"/>
<jvmarg value="-Didea.launcher.bin.path=${idea.ultimate.build}/bin"/>
<!-- Tests fail with a default MaxPermSize. They use up all of the PermGen memory. -->
<jvmarg value="-XX:MaxPermSize=256m"/>
<classpath refid="classpath.test"/>
<formatter type="brief" usefile="false"/>
<batchtest>
<fileset dir="testSrc">
<include name="**/*Test.java"/>
<exclude name="**/*TestCase.java"/>
</fileset>
</batchtest>
</junit>
<fail if="failure_found" message="Unit test failures detected."/>
</target>
</project>