This repository has been archived by the owner on Sep 23, 2020. It is now read-only.
/
build.xml
294 lines (248 loc) · 10.9 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<project basedir="." default="checkjdk" name="Nimbus for GT4.0 build file">
<description>Internal Service Integration Test Suites</description>
<!-- load user nimbus.build.properties file, if it exists -->
<property file="${user.home}/nimbus.build.properties"/>
<!-- load defaults from colocated build.properties file -->
<property file="build.properties"/>
<!-- *******************************************************************
CLASSPATHS
******************************************************************* -->
<path id="suites.deps.cp">
<fileset dir="${nimbus.st.main.lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${nimbus.st.test.lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<path id="suites.compile.cp">
<path refid="suites.deps.cp"/>
<fileset dir="${nimbus.st.authz.dist.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${nimbus.st.service.api.dist.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${nimbus.st.service.main.dist.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${nimbus.st.metadata.dist.dir}">
<include name="*.jar"/>
</fileset>
</path>
<path id="suites.run.cp">
<path refid="suites.compile.cp"/>
<pathelement path="${nimbus.suites.testsrc.build.dest}" />
</path>
<!-- *******************************************************************
INIT
******************************************************************* -->
<taskdef resource="testngtasks" classpathref="suites.deps.cp"/>
<target name="checkjdk">
<available property="jdk1.5+"
classname="java.lang.Readable"/>
<fail message="Aborting: determined you are not building with >= JDK 1.5"
unless="jdk1.5+" />
</target>
<target name="init" depends="checkjdk">
<mkdir dir="${nimbus.suites.testsrc.build.dest}"/>
</target>
<!-- *******************************************************************
BUILD
******************************************************************* -->
<target name="depclean" depends="init">
<ant dir="${nimbus.st.authzdb.builddir}" target="clean" />
<ant dir="${nimbus.st.service.api.builddir}" target="clean" />
<ant dir="${nimbus.st.service.main.builddir}" target="clean" />
<ant dir="${nimbus.st.metadata.builddir}" target="clean" />
</target>
<target name="depdist" depends="init">
<ant dir="${nimbus.st.authzdb.builddir}" target="dist" />
<ant dir="${nimbus.st.service.api.builddir}" target="dist" />
<ant dir="${nimbus.st.service.main.builddir}" target="dist" />
<ant dir="${nimbus.st.metadata.builddir}" target="dist" />
</target>
<target name="clean" depends="init">
<delete dir="${nimbus.suites.testsrc.build.dest}"/>
<delete dir="tmp"/>
<echo message="Cleaned: ${basedir}" />
</target>
<target name="compile-common" depends="depdist">
<javac srcdir="${nimbus.suites.testsrc.src0.dir}"
destdir="${nimbus.suites.testsrc.build.dest}"
classpathref="suites.compile.cp"
includeantruntime="false"
source="1.5"
target="1.5"
debug="on">
<include name="**/*.java"/>
<compilerarg value="${nimbus.java.compilerarg}" />
</javac>
</target>
<target name="compile-suites" depends="compile-common">
<javac srcdir="${nimbus.suites.testsrc.src1.dir}"
destdir="${nimbus.suites.testsrc.build.dest}"
classpathref="suites.run.cp"
includeantruntime="false"
source="1.5"
target="1.5"
debug="on">
<include name="**/*.java"/>
<compilerarg value="${nimbus.java.compilerarg}" />
</javac>
<javac srcdir="${nimbus.suites.testsrc.src2.dir}"
destdir="${nimbus.suites.testsrc.build.dest}"
classpathref="suites.run.cp"
includeantruntime="false"
source="1.5"
target="1.5"
debug="on">
<include name="**/*.java"/>
<compilerarg value="${nimbus.java.compilerarg}" />
</javac>
<javac srcdir="${nimbus.suites.testsrc.src3.dir}"
destdir="${nimbus.suites.testsrc.build.dest}"
classpathref="suites.run.cp"
includeantruntime="false"
source="1.5"
target="1.5"
debug="on">
<include name="**/*.java"/>
<compilerarg value="${nimbus.java.compilerarg}" />
</javac>
</target>
<target name="setup" depends="depdist,compile-suites">
<fail unless="nimbussuites.test.reports.dir">
You have not set the 'nimbussuites.test.reports.dir' property, are you not
using the integration test shell script?
</fail>
</target>
<!-- *******************************************************************
ONE SUITE AT A TIME
******************************************************************* -->
<!-- Derby database re-installation not working when one JVM is used for all suites.
So we do one JVM per suite, i.e. for each database full-wipe.
This has the unfortunate side effect of needing an html page per suite instead
of all suites being in a nice table.
-->
<target name="runone" depends="setup">
<testng classpathref="suites.run.cp"
outputDir="${nimbussuites.test.reports.dir}/${runone.suite.report.subdir}"
haltOnfailure="true"
parallel="false">
<sysproperty key="nimbus.servicetestsuites.abspath"
value="${nimbus.suitesdir}" />
<xmlfileset file="${runone.suite.file}" />
</testng>
</target>
<!-- BASIC SUITES -->
<target name="basic01">
<antcall target="runone">
<param name="runone.suite.file" value="${st.basic.dir}/${st.basic01}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.basic01}"/>
</antcall>
</target>
<target name="basic02">
<antcall target="runone">
<param name="runone.suite.file" value="${st.basic.dir}/${st.basic02}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.basic02}"/>
</antcall>
</target>
<target name="basic03">
<antcall target="runone">
<param name="runone.suite.file" value="${st.basic.dir}/${st.basic03}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.basic03}"/>
</antcall>
</target>
<target name="basic04">
<antcall target="runone">
<param name="runone.suite.file" value="${st.basic.dir}/${st.basic04}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.basic04}"/>
</antcall>
</target>
<target name="basic05">
<antcall target="runone">
<param name="runone.suite.file" value="${st.basic.dir}/${st.basic05}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.basic05}"/>
</antcall>
</target>
<target name="basic06">
<antcall target="runone">
<param name="runone.suite.file" value="${st.basic.dir}/${st.basic06}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.basic06}"/>
</antcall>
</target>
<target name="allbasic" depends="basic01,basic02,basic03,basic04,basic05,basic06" />
<!-- FAILURE/TERMINATION SUITES -->
<target name="failure01">
<antcall target="runone">
<param name="runone.suite.file" value="${st.failure.dir}/${st.failure01}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.failure01}"/>
</antcall>
</target>
<target name="failure02">
<antcall target="runone">
<param name="runone.suite.file" value="${st.failure.dir}/${st.failure02}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.failure02}"/>
</antcall>
</target>
<target name="allfailure" depends="failure01,failure02" />
<!-- SPOT INSTANCE SUITES -->
<target name="spot01">
<antcall target="runone">
<param name="runone.suite.file" value="${st.spot.dir}/${st.spot01}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.spot01}"/>
</antcall>
</target>
<target name="spot02">
<antcall target="runone">
<param name="runone.suite.file" value="${st.spot.dir}/${st.spot02}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.spot02}"/>
</antcall>
</target>
<target name="spot03">
<antcall target="runone">
<param name="runone.suite.file" value="${st.spot.dir}/${st.spot03}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.spot03}"/>
</antcall>
</target>
<target name="spot04">
<antcall target="runone">
<param name="runone.suite.file" value="${st.spot.dir}/${st.spot04}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.spot04}"/>
</antcall>
</target>
<target name="spot05">
<antcall target="runone">
<param name="runone.suite.file" value="${st.spot.dir}/${st.spot05}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.spot05}"/>
</antcall>
</target>
<target name="spot06">
<antcall target="runone">
<param name="runone.suite.file" value="${st.spot.dir}/${st.spot06}.xml"/>
<param name="runone.suite.report.subdir" value="basic-${st.spot06}"/>
</antcall>
</target>
<target name="allspot" depends="spot01,spot02,spot03,spot04,spot05,spot06" />
<!-- *******************************************************************
RUN ALL SUITES: FAILING
******************************************************************* -->
<!-- Derby database re-installation not working when one JVM is used for all suites.
So this is broken, see above -->
<fileset id="allsuites.fileset" dir="${nimbus.suitesdir}">
<include name="basic/*.xml"/>
<include name="failure/*.xml"/>
<include name="spotinstances/*.xml"/>
</fileset>
<target name="broken-runall" depends="setup">
<testng classpathref="suites.run.cp"
outputDir="${nimbussuites.test.reports.dir}"
haltOnfailure="true"
parallel="false">
<sysproperty key="nimbus.servicetestsuites.abspath"
value="${nimbus.suitesdir}" />
<xmlfileset refid="allsuites.fileset" />
</testng>
</target>
</project>