-
Notifications
You must be signed in to change notification settings - Fork 143
/
build.xml
333 lines (285 loc) · 10.5 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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 2022, 2022 Contributors to the Eclipse Foundation.
Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!ENTITY commonSetup SYSTEM "../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "../../config/common.xml">
<!ENTITY commonRun SYSTEM "../../config/run.xml">
<!ENTITY reporting SYSTEM "report.xml">
<!ENTITY emma SYSTEM "../../config/emma.xml">
]>
<project name="ejb" default="usage" basedir=".">
&commonSetup;
&commonBuild;
&commonRun;
&reporting;
&emma;
<patternset id="emma.instrument.jar.files">
<include name="ejb-full-container.jar" />
<include name="ejb-container.jar" />
<include name="ejb-internal-api.jar" />
<include name="gf-ejb-connector.jar" />
</patternset>
<target name="all">
<antcall target="setup" />
<antcall target="test-all" />
<antcall target="unsetup" />
<antcall target="report" />
</target>
<target name="lite">
<antcall target="setup" />
<antcall target="test-lite" />
<antcall target="unsetup" />
<antcall target="report-lite" />
</target>
<target name="ejb_group_1">
<antcall target="setup" />
<antcall target="test-group-1" />
<antcall target="unsetup" />
<antcall target="report" />
</target>
<target name="ejb_group_2">
<antcall target="setup" />
<antcall target="test-group-2" />
<antcall target="unsetup" />
<antcall target="report" />
</target>
<target name="ejb_group_3">
<antcall target="setup" />
<antcall target="test-group-3" />
<antcall target="unsetup" />
<antcall target="report" />
</target>
<target name="ejb_group_embedded">
<run-ejb-test path="ejb32/embedded" target="all" />
<run-ejb-test path="ejb31/embedded" target="all" />
<antcall target="report" />
</target>
<target name="setup">
<antcall target="start-database" />
<ant target="startDomain" />
<ant target="clean-result" />
</target>
<target name="clean-result">
<delete>
<fileset dir="${env.APS_HOME}" includes="test_results*" />
</delete>
<delete>
<fileset dir="." includes="*.output" />
</delete>
<record name="ejb.output" action="start" />
</target>
<target name="test-lite">
<run-ejb-test path="ejb32" target="lite" />
<run-ejb-test path="ejb31" target="lite" />
</target>
<target name="test-all">
<run-ejb-test path="stubs" target="all" />
<run-ejb-test path="txprop" target="all" />
<run-ejb-test path="ejbc" target="all" />
<run-ejb-test path="ejb30" target="all" />
<run-ejb-test path="mdb" target="all" />
<run-ejb-test path="cli" target="all" />
<run-ejb-test path="timer" target="all" />
<run-ejb-test path="bmp" target="all" />
<run-ejb-test path="cmp" target="all" />
<run-ejb-test path="sfsb" target="all" />
<run-ejb-test path="allowedmethods" target="all" />
<run-ejb-test path="jms" target="all" />
<run-ejb-test path="ejb32" target="all" />
<run-ejb-test path="ejb31" target="all" />
<!-- ejb31 must be the last set of tests because embedded test might stop database -->
<run-ejb-test path="ejb32/embedded" target="all" />
<run-ejb-test path="ejb31/embedded" target="all" />
</target>
<target name="test-group-1">
<run-ejb-test path="stubs" target="all" />
<run-ejb-test path="txprop" target="all" />
<run-ejb-test path="ejbc" target="all" />
<run-ejb-test path="ejb30" target="all" />
</target>
<target name="test-group-2">
<run-ejb-test path="mdb" target="all" />
<run-ejb-test path="cli" target="all" />
<run-ejb-test path="timer" target="all" />
<run-ejb-test path="bmp" target="all" />
</target>
<target name="test-group-3">
<run-ejb-test path="cmp" target="all" />
<run-ejb-test path="sfsb" target="all" />
<run-ejb-test path="allowedmethods" target="all" />
<run-ejb-test path="jms" target="all" />
<run-ejb-test path="ejb32" target="all" />
<run-ejb-test path="ejb31" target="all" />
</target>
<target name="unsetup">
<echo message="Stopping app server instance" />
<ant target="stopDomain" />
<antcall target="stop-database" />
<record name="ejb.output" action="stop" />
</target>
<target name="orb_integration">
<run-ejb-test path="ejb30" target="clientview" />
<run-ejb-test path="ejb30" target="hello" />
<run-ejb-test path="ejbc" target="all" />
<run-ejb-test path="txprop" target="all" />
<run-ejb-test path="stubs" target="all" />
<run-ejb-test path="bmp" target="txtests" />
</target>
<target name="start-database" depends="init-common">
<echo message="Starting database --dbport ${db.port}" />
<!-- spawn is added to prevent a hang on Windows -->
<exec spawn="true" executable="${ASADMIN}" failonerror="false">
<arg line="start-database --dbport ${db.port}" />
</exec>
</target>
<target name="stop-database" depends="init-common">
<echo message="Stopping database --dbport ${db.port}" />
<exec executable="${ASADMIN}" failonerror="false">
<arg line="stop-database --dbport ${db.port}" />
</exec>
</target>
<target name="report-result" depends="init-common">
<antcall target="dev-report" />
</target>
<target name="allowedmethods">
<record name="allowedmethods.output" action="start" />
<ant dir="allowedmethods" target="all" />
<record name="allowedmethods.output" action="stop" />
<antcall target="report" />
</target>
<target name="bmp">
<record name="bmp.output" action="start" />
<ant dir="bmp" target="all" />
<record name="bmp.output" action="stop" />
<antcall target="report" />
</target>
<target name="ejb30">
<record name="ejb30.output" action="start" />
<ant dir="ejb30" target="all" />
<record name="ejb30.output" action="stop" />
<antcall target="report" />
</target>
<target name="ejb31">
<record name="ejb31.output" action="start" />
<ant dir="ejb31" target="all" />
<record name="ejb31.output" action="stop" />
<antcall target="report" />
</target>
<target name="ejb32">
<record name="ejb32.output" action="start" />
<ant dir="ejb32" target="all" />
<record name="ejb32.output" action="stop" />
<antcall target="report" />
</target>
<target name="ejbc">
<record name="ejbc.output" action="start" />
<ant dir="ejbc" target="all" />
<record name="ejbc.output" action="stop" />
<antcall target="report" />
</target>
<target name="jms">
<record name="jms.output" action="start" />
<ant dir="jms" target="all" />
<record name="jms.output" action="stop" />
<antcall target="report" />
</target>
<target name="mdb">
<record name="mdb.output" action="start" />
<ant dir="mdb" target="all" />
<record name="mdb.output" action="stop" />
<antcall target="report" />
</target>
<target name="stubs">
<record name="stubs.output" action="start" />
<ant dir="stubs" target="all" />
<record name="stubs.output" action="stop" />
<antcall target="report" />
</target>
<target name="timer">
<record name="timer.output" action="start" />
<ant dir="timer" target="all" />
<record name="timer.output" action="stop" />
<antcall target="report" />
</target>
<target name="cli">
<record name="cli.output" action="start" />
<ant dir="cli" target="all" />
<record name="cli.output" action="stop" />
<antcall target="report" />
</target>
<target name="txprop">
<record name="txprop.output" action="start" />
<ant dir="txprop" target="all" />
<record name="txprop.output" action="stop" />
<antcall target="report" />
</target>
<target name="sfsb">
<record name="sfsb.output" action="start" />
<ant dir="sfsb" target="all" />
<record name="sfsb.output" action="stop" />
<antcall target="report" />
</target>
<target name="stress">
<record name="stress.output" action="start" />
<ant dir="stress" target="all" />
<record name="stress.output" action="stop" />
<antcall target="report" />
</target>
<target name="usage">
<echo>
Usage:
ant all (Executes all the ejb tests)
ant orb_integration (Executes all ejb-related orb integration tests)
ant allowedmethods (Executes the ejb allowedmethods tests)
ant bmp (Executes the ejb bmp tests)
ant ejbc (Executes the ejb ejbc tests)
ant jms (Executes the ejb jms tests)
ant mdb (Executes the ejb mdb tests)
ant stubs (Executes the ejb stubs tests)
ant timer (Executes the ejb timer tests)
ant txprop (Executes the ejb txprop tests)
ant sfsb (Executes the ejb sfsb tests)
ant stress (Executes the ejb stress tests)
ant ejb30 (Executes the ejb30 tests)
ant ejb31 (Executes the ejb31 tests)
</echo>
</target>
<macrodef name="run-ejb-test" xmlns:if="ant:if" xmlns:unless="ant:unless">
<attribute name="path" />
<attribute name="target" />
<sequential>
<local name="do-run-test" />
<condition property="do-run-test" else="false">
<or>
<equals arg1="${env.ejb}" arg2="@{path}" />
<not>
<isset property="env.ejb" />
</not>
</or>
</condition>
<sequential if:true="${do-run-test}">
<local name="absolute.path" />
<property name="absolute.path" location="@{path}" />
<echo message="${line.separator} ${line.separator}" />
<echo message=" **************************************************" />
<echo message=" * Running @{path} " />
<echo message=" * Path: ${absolute.path} " />
<echo message=" **************************************************" />
<echo message="${line.separator} ${line.separator}" />
<ant dir="@{path}" target="@{target}" />
</sequential>
</sequential>
</macrodef>
</project>