Lines 34-40
Link Here
|
34 |
#******************************************************************************/--> |
34 |
#******************************************************************************/--> |
35 |
|
35 |
|
36 |
<!-- This ant project includes the following tasks: |
36 |
<!-- This ant project includes the following tasks: |
37 |
- all (default) : compiles all JPA tests, packages test jars |
37 |
- build (default) : compiles all JPA tests, packages test jars |
38 |
- compile : compiles all JPA tests |
38 |
- compile : compiles all JPA tests |
39 |
- package : jars JPA persistent units and tests jars |
39 |
- package : jars JPA persistent units and tests jars |
40 |
- test : runs als JPA WDF tests |
40 |
- test : runs als JPA WDF tests |
Lines 63-68
Link Here
|
63 |
<property name="wdf_test.2.moxy.dir" value="${wdf_test.2.trunk.dir}/moxy/org.eclipse.persistence.moxy"/> |
63 |
<property name="wdf_test.2.moxy.dir" value="${wdf_test.2.trunk.dir}/moxy/org.eclipse.persistence.moxy"/> |
64 |
<property name="wdf_test.2.core.test.dir" value="${wdf_test.2.trunk.dir}/foundation/eclipselink.core.test"/> |
64 |
<property name="wdf_test.2.core.test.dir" value="${wdf_test.2.trunk.dir}/foundation/eclipselink.core.test"/> |
65 |
<property name="env" environment="env" value="env"/> |
65 |
<property name="env" environment="env" value="env"/> |
|
|
66 |
<property name="eclipselink.jpa.test" value="../eclipselink.jpa.test"/> |
66 |
|
67 |
|
67 |
<!-- Allows a user to overide certain user specific properties. --> |
68 |
<!-- Allows a user to overide certain user specific properties. --> |
68 |
<property file="${user.home}/build.properties"/> |
69 |
<property file="${user.home}/build.properties"/> |
Lines 76-82
Link Here
|
76 |
<target name="build-against-jar" depends="clean, init_against_jar, compile, package" description="build JPA WDF testing jars"/> |
77 |
<target name="build-against-jar" depends="clean, init_against_jar, compile, package" description="build JPA WDF testing jars"/> |
77 |
<target name="build-against-classes" depends="clean, init_against_classes, compile, package" description="build JPA WDF testing jars"/> |
78 |
<target name="build-against-classes" depends="clean, init_against_classes, compile, package" description="build JPA WDF testing jars"/> |
78 |
<target name="build-against-bundles" depends="clean, init_against_bundles, compile, package" description="build JPA WDF testing jars"/> |
79 |
<target name="build-against-bundles" depends="clean, init_against_bundles, compile, package" description="build JPA WDF testing jars"/> |
79 |
<target name="test-against-jar" depends="clean-test, init_against_jar, init_runtime, test-lrg" description="run JPA WDF tests"/> |
80 |
<target name="test-against-jar" depends="clean-test, init_against_jar, init_runtime, test-lrg" description="run JPA WDF tests"/> |
80 |
<target name="test-against-classes" depends="clean-test, init_against_classes, init_runtime, test-lrg" description="run JPA WDF tests"/> |
81 |
<target name="test-against-classes" depends="clean-test, init_against_classes, init_runtime, test-lrg" description="run JPA WDF tests"/> |
81 |
<target name="test-against-bundles" depends="clean-test, init_against_bundles, init_runtime, test-lrg" description="run JPA WDF tests"/> |
82 |
<target name="test-against-bundles" depends="clean-test, init_against_bundles, init_runtime, test-lrg" description="run JPA WDF tests"/> |
82 |
<!-- convienience targets --> |
83 |
<!-- convienience targets --> |
Lines 100-110
Link Here
|
100 |
<pathelement path="${wdf_test.2.core.test.dir}/${classes.dir}"/> |
101 |
<pathelement path="${wdf_test.2.core.test.dir}/${classes.dir}"/> |
101 |
<pathelement path="${wdf_test.2.core.test.dir}/${eclipselink.tests.jar}"/> |
102 |
<pathelement path="${wdf_test.2.core.test.dir}/${eclipselink.tests.jar}"/> |
102 |
<pathelement path="${wdf_test.2.jpa.plugins.dir}/${persistence20.jar}"/> |
103 |
<pathelement path="${wdf_test.2.jpa.plugins.dir}/${persistence20.jar}"/> |
|
|
104 |
<pathelement path="${wdf_test.2.common.plugins.dir}/${ejb.jar}"/> |
103 |
<!-- These paths are unneeded for compile or run (from core.depend) may be needed in future --> |
105 |
<!-- These paths are unneeded for compile or run (from core.depend) may be needed in future --> |
104 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${unsigned.persistence10.jar}"/ --> |
106 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${unsigned.persistence10.jar}"/ --> |
105 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${activation.jar}"/ --> |
107 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${activation.jar}"/ --> |
106 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${resource.jar}"/ --> |
108 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${resource.jar}"/ --> |
107 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${ejb.jar}"/ --> |
|
|
108 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${jms.jar}"/ --> |
109 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${jms.jar}"/ --> |
109 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${stax_api.jar}"/ --> |
110 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${stax_api.jar}"/ --> |
110 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${mail.jar}"/ --> |
111 |
<!-- pathelement path="${wdf_test.2.common.plugins.dir}/${mail.jar}"/ --> |
Lines 178-210
Link Here
|
178 |
<path refid="compile.path"/> |
179 |
<path refid="compile.path"/> |
179 |
</classpath> |
180 |
</classpath> |
180 |
</javac> |
181 |
</javac> |
|
|
182 |
<javac |
183 |
srcdir="${wdf_test.2.core.test.dir}/${src.dir}" |
184 |
destdir="${classes.dir}" |
185 |
debug="${javac.debug}" |
186 |
debuglevel="${javac.debuglevel}" |
187 |
optimize="${javac.optimize}" |
188 |
source="${javac.version}" |
189 |
target="${javac.version}" |
190 |
deprecation="${javac.deprecation}" |
191 |
failonerror="true" |
192 |
includes="org/eclipse/persistence/testing/framework/junit/**, |
193 |
org/eclipse/persistence/testing/framework/AutoVerifyTestCase.java, |
194 |
org/eclipse/persistence/testing/framework/TestCase.java, |
195 |
org/eclipse/persistence/testing/framework/TestEntity.java, |
196 |
org/eclipse/persistence/testing/framework/TestModel.java, |
197 |
org/eclipse/persistence/testing/framework/*TestHelper.java, |
198 |
org/eclipse/persistence/testing/framework/QuerySQLTracker.java, |
199 |
org/eclipse/persistence/testing/framework/TestWarningException.java, |
200 |
org/eclipse/persistence/testing/framework/TestException.java, |
201 |
org/eclipse/persistence/testing/framework/TestErrorException.java, |
202 |
org/eclipse/persistence/testing/framework/TestProblemException.java, |
203 |
org/eclipse/persistence/testing/framework/ResultInterface.java, |
204 |
org/eclipse/persistence/testing/framework/TestCollection.java, |
205 |
org/eclipse/persistence/testing/framework/PerformanceComparisonTest.java, |
206 |
org/eclipse/persistence/testing/framework/PerformanceComparisonTestCase.java, |
207 |
org/eclipse/persistence/testing/framework/TestResult.java, |
208 |
org/eclipse/persistence/testing/framework/PerformanceComparisonTestResult.java, |
209 |
org/eclipse/persistence/testing/framework/PerformanceRegressionTest.java, |
210 |
org/eclipse/persistence/testing/framework/PerformanceRegressionTestCase.java, |
211 |
org/eclipse/persistence/testing/framework/ConcurrencyTestAdapter.java, |
212 |
org/eclipse/persistence/testing/framework/ConcurrentPerformanceComparisonTest.java, |
213 |
org/eclipse/persistence/testing/framework/ConcurrentPerformanceRegressionTest.java"> |
214 |
<classpath refid="compile.path"/> |
215 |
</javac> |
181 |
</target> |
216 |
</target> |
|
|
217 |
|
218 |
<target name="get-server-properties"> |
219 |
<property file="${eclipselink.jpa.test}/${server.name}.properties"/> |
220 |
<echo message="server.lib=${server.lib}"/> |
221 |
<echo message="server.depend=${server.depend}"/> |
222 |
<echo message="server.name=${server.name}"/> |
223 |
<echo message="server.platform=${server.platform}"/> |
224 |
</target> |
182 |
|
225 |
|
183 |
<!-- Packages JPA persistent unit test jars. --> |
226 |
<!-- Packages JPA persistent unit test jars. --> |
184 |
<target name="package" depends="package-wdf-jpa2-model, package-wdf-jpa1-model" description="build EclipseLink jar"> |
227 |
<target name="package" depends="package-tests, package-wdf-jpa2-model, package-wdf-jpa1-model" description="build EclipseLink jar"/> |
|
|
228 |
|
229 |
|
230 |
<target name="package-tests" depends="get-server-properties"> |
231 |
<mkdir dir="${wdf_test.build.location}/stage"/> |
232 |
<filter token="server.user" value="${server.user}"/> |
233 |
<filter token="server.pwd" value="${server.pwd}"/> |
234 |
<filter token="server.factory" value="${server.factory}"/> |
235 |
<echo message="eclipselink.jpa.test=${eclipselink.jpa.test}"/> |
236 |
|
237 |
<copy file="${wdf_test.build.location}/../eclipselink.jpa.test/resource/server/jndi.properties" todir="stage" filtering="true"/> |
238 |
|
185 |
<jar jarfile="${wdf_test.build.location}/${eclipselink.tests.jar}"> |
239 |
<jar jarfile="${wdf_test.build.location}/${eclipselink.tests.jar}"> |
|
|
240 |
<zipfileset dir="${wdf_test.build.location}/resource/ejb" includes="*.xml" prefix="META-INF"/> |
186 |
<fileset dir="${wdf_test.build.location}/${classes.dir}" |
241 |
<fileset dir="${wdf_test.build.location}/${classes.dir}" |
187 |
includes="org/eclipse/persistence/testing/framework/**/*.class, |
242 |
includes="org/eclipse/persistence/testing/framework/**/*.class, |
188 |
org/eclipse/persistence/testing/tests/**/*.class"/> |
243 |
org/eclipse/persistence/testing/tests/**/*.class"/> |
|
|
244 |
<fileset dir="${wdf_test.build.location}/stage" |
245 |
includes="jndi.properties"/> |
189 |
</jar> |
246 |
</jar> |
|
|
247 |
<delete dir="stage"/> |
190 |
</target> |
248 |
</target> |
191 |
|
249 |
|
192 |
<target name="package-wdf-jpa2-model"> |
250 |
<target name="package-model" depends="get-server-properties,set-app-name"> |
193 |
<jar jarfile="${wdf_test.build.location}/${eclipselink.wdf.jpa2.model}.jar"> |
251 |
<copy overwrite="true" file="${wdf_test.build.location}/resource/${MODEL}/persistence.xml" todir="${build.dir}/META-INF"/> |
194 |
<zipfileset dir="${wdf_test.build.location}/resource/${eclipselink.wdf.jpa2.model}" includes="*.xml" prefix="META-INF"/> |
252 |
<replace dir="${build.dir}/META-INF" token='%%database-platform%%' value="${db.platform}"> |
|
|
253 |
<include name="persistence.xml"/> |
254 |
</replace> |
255 |
<replace dir="${build.dir}/META-INF" token='%%data-source-name%%' value="${DS_NAME}"> |
256 |
<include name="persistence.xml"/> |
257 |
</replace> |
258 |
<replace dir="${build.dir}/META-INF" token='%%server-platform%%' value="${server.platform}"> |
259 |
<include name="persistence.xml"/> |
260 |
</replace> |
261 |
<jar jarfile="${wdf_test.build.location}/${MODEL}.jar"> |
262 |
<zipfileset dir="${build.dir}/META-INF" includes="*.xml" prefix="META-INF"/> |
195 |
<fileset dir="${wdf_test.build.location}/${classes.dir}" |
263 |
<fileset dir="${wdf_test.build.location}/${classes.dir}" |
196 |
includes="org/eclipse/persistence/testing/models/wdf/jpa2/**"/> |
264 |
includes="${PACKAGE}"/> |
197 |
</jar> |
265 |
</jar> |
|
|
266 |
<delete dir="${build.dir}/META-INF"/> |
198 |
</target> |
267 |
</target> |
199 |
|
268 |
|
200 |
<target name="package-wdf-jpa1-model"> |
269 |
<target name="package-wdf-jpa1-model"> |
201 |
<jar jarfile="${wdf_test.build.location}/${eclipselink.wdf.jpa1.model}.jar"> |
270 |
<antcall target="package-model"> |
202 |
<zipfileset dir="${wdf_test.build.location}/resource/${eclipselink.wdf.jpa1.model}" includes="*.xml" prefix="META-INF"/> |
271 |
<param name="MODEL" value="${eclipselink.wdf.jpa1.model}"/> |
203 |
<fileset dir="${wdf_test.build.location}/${classes.dir}" |
272 |
<param name="PACKAGE" value="org/eclipse/persistence/testing/models/wdf/jpa1/**"/> |
204 |
includes="org/eclipse/persistence/testing/models/wdf/jpa1/**"/> |
273 |
</antcall> |
205 |
</jar> |
|
|
206 |
</target> |
274 |
</target> |
207 |
|
275 |
|
|
|
276 |
<target name="package-wdf-jpa2-model"> |
277 |
<antcall target="package-model"> |
278 |
<param name="MODEL" value="${eclipselink.wdf.jpa2.model}"/> |
279 |
<param name="PACKAGE" value="org/eclipse/persistence/testing/models/wdf/jpa2/**"/> |
280 |
</antcall> |
281 |
</target> |
282 |
|
208 |
<!-- Testing --> |
283 |
<!-- Testing --> |
209 |
|
284 |
|
210 |
<!-- Clean all build generated content. --> |
285 |
<!-- Clean all build generated content. --> |
Lines 227-240
Link Here
|
227 |
</target> |
302 |
</target> |
228 |
|
303 |
|
229 |
<!-- Default test target, run the LRG --> |
304 |
<!-- Default test target, run the LRG --> |
230 |
<target name="test-lrg" depends="clean-test"> |
305 |
<target name="test-lrg"> |
231 |
<antcall target="run-test" inheritRefs="true"> |
306 |
<antcall target="run-test" inheritRefs="true"> |
232 |
<param name="TEST_CLASS" value="${test.class}"/> |
307 |
<param name="TEST_CLASS" value="${test.class}"/> |
233 |
<param name="TEST_AGENT" value="${test.agent}"/> |
308 |
<param name="TEST_AGENT" value="${test.agent}"/> |
234 |
<param name="TEST_WEAVING" value="${test.weaving}"/> |
309 |
<param name="TEST_WEAVING" value="${test.weaving}"/> |
235 |
<param name="ORM_TESTING" value="-Dorm.testing=jpa"/> |
310 |
<param name="ORM_TESTING" value="-Dorm.testing=jpa"/> |
236 |
<param name="RUN_PATH" value="run.path"/> |
311 |
<param name="RUN_PATH" value="run.path"/> |
237 |
<param name="DB_URL" value="${db.url}"/> |
312 |
<param name="DB_URL" value="${db.url}"/> |
|
|
313 |
<param name="SERVER" value="false"/> |
238 |
</antcall> |
314 |
</antcall> |
239 |
<antcall target="generate-report" inheritRefs="true"/> |
315 |
<antcall target="generate-report" inheritRefs="true"/> |
240 |
</target> |
316 |
</target> |
Lines 260-265
Link Here
|
260 |
<jvmarg value="-Ddb.user=${db.user}"/> |
336 |
<jvmarg value="-Ddb.user=${db.user}"/> |
261 |
<jvmarg value="-Ddb.pwd=${db.pwd}"/> |
337 |
<jvmarg value="-Ddb.pwd=${db.pwd}"/> |
262 |
<jvmarg value="${jvmarg.db.platform}"/> |
338 |
<jvmarg value="${jvmarg.db.platform}"/> |
|
|
339 |
<jvmarg value="-Dservertest=${SERVER}"/> |
340 |
<sysproperty key="server.url" value="${server.url}${APP_NAME}"/> |
341 |
<sysproperty key="server.testrunner.wdf" value="${server.testrunner.wdf}"/> |
342 |
<sysproperty key="datasource.name" value="${DS_LOOKUP_NAME}"/> |
263 |
<classpath> |
343 |
<classpath> |
264 |
<path refid="${RUN_PATH}"/> |
344 |
<path refid="${RUN_PATH}"/> |
265 |
</classpath> |
345 |
</classpath> |
Lines 281-284
Link Here
|
281 |
</junitreport> |
361 |
</junitreport> |
282 |
</target> |
362 |
</target> |
283 |
|
363 |
|
|
|
364 |
|
365 |
<!-- Build server test ear. --> |
366 |
<target name="server-build-ear" depends="build-against-jar" > |
367 |
<copy overwrite="true" file="./resource/ear/application.xml" todir="${build.dir}/META-INF"/> |
368 |
<ear destfile="${wdf_test.build.location}/${build.dir}/servertest.ear" appxml="${build.dir}/META-INF/application.xml"> |
369 |
<fileset file="${wdf_test.build.location}/${eclipselink.tests.jar}"/> |
370 |
<zipfileset dir="${wdf_test.build.location}" includes="${eclipselink.wdf.jpa1.model}.jar" prefix="${LIB_PREFIX}"/> |
371 |
</ear> |
372 |
<copy file="${wdf_test.build.location}/${build.dir}/servertest.ear" todir="${basedir}"/> |
373 |
</target> |
374 |
|
375 |
<target name="server-deploy"> |
376 |
<ant antfile="${eclipselink.jpa.test}/${server.name}.xml" target="${server.name}-deploy" inheritRefs="true"> |
377 |
<property name="ear.name" value="${ear.name}"/> |
378 |
<property name="application.name" value="${application.name}"/> |
379 |
</ant> |
380 |
</target> |
381 |
|
382 |
<target name="server-undeploy"> |
383 |
<ant antfile="${eclipselink.jpa.test}/${server.name}.xml" target="${server.name}-undeploy" inheritRefs="true"> |
384 |
<property name="application.name" value="${application.name}"/> |
385 |
</ant> |
386 |
</target> |
387 |
|
388 |
<!-- Allows we run websphere tests from Windows & Linux both. --> |
389 |
<target name="detect-os"> |
390 |
<condition property="is.windows" value="true"> |
391 |
<os family="windows"/> |
392 |
</condition> |
393 |
<condition property="is.unix" value="true"> |
394 |
<os family="unix"/> |
395 |
</condition> |
396 |
<condition property="suffix" value="bat"> |
397 |
<isset property="is.windows"/> |
398 |
</condition> |
399 |
<condition property="suffix" value="sh"> |
400 |
<isset property="is.unix"/> |
401 |
</condition> |
402 |
<echo message="suffix=${suffix}"/> |
403 |
</target> |
404 |
|
405 |
|
406 |
<target name="set-app-name" depends="detect-os"> |
407 |
<condition property="APP_NAME" value=""> |
408 |
<contains string="${server.name}" substring="websphere"/> |
409 |
</condition> |
410 |
<condition property="APP_NAME" value="servertest"> |
411 |
<not> |
412 |
<isset property="is.websphere"/> |
413 |
</not> |
414 |
</condition> |
415 |
|
416 |
<condition property="DS_NAME" value="java:/EclipseLinkDS"> |
417 |
<contains string="${server.name}" substring="jboss"/> |
418 |
</condition> |
419 |
<condition property="DS_NAME" value="jdbc/EclipseLinkDS"> |
420 |
<not> |
421 |
<isset property="is.jboss"/> |
422 |
</not> |
423 |
</condition> |
424 |
|
425 |
<condition property="DS_LOOKUP_NAME" value="jdbc/${DS_NAME}"> |
426 |
<contains string="${server.name}" substring="netweaver"/> |
427 |
</condition> |
428 |
<condition property="DS_LOOKUP_NAME" value="${DS_NAME}"> |
429 |
<not> |
430 |
<isset property="is.netweaver"/> |
431 |
</not> |
432 |
</condition> |
433 |
|
434 |
|
435 |
<condition property="LIB_PREFIX" value=""> |
436 |
<contains string="${server.name}" substring="netweaver"/> |
437 |
</condition> |
438 |
<condition property="LIB_PREFIX" value="lib"> |
439 |
<not> |
440 |
<isset property="is.netweaver"/> |
441 |
</not> |
442 |
</condition> |
443 |
</target> |
444 |
|
445 |
<!-- Build, deploy and run a test suite on the server. --> |
446 |
<target name="server-test" depends="get-server-properties, detect-os, set-app-name, server-build-ear, init_runtime"> |
447 |
<antcall target="server-deploy" inheritRefs="true"> |
448 |
<param name="ear.name" value="servertest.ear"/> |
449 |
<param name="application.name" value="servertest"/> |
450 |
</antcall> |
451 |
<path id="run.path.server"> |
452 |
<fileset dir="${server.lib}" includes="${server.depend}"/> |
453 |
<path refid="run.path"/> |
454 |
</path> |
455 |
<antcall target="run-test" inheritRefs="true"> |
456 |
<param name="TEST_CLASS" value="${test.class}"/> |
457 |
<param name="TEST_AGENT" value="${test.agent}"/> |
458 |
<param name="TEST_WEAVING" value="${test.weaving}"/> |
459 |
<param name="ORM_TESTING" value="-Dorm.testing=jpa"/> |
460 |
<param name="RUN_PATH" value="run.path.server"/> |
461 |
<param name="DB_URL" value="${db.url}"/> |
462 |
<param name="SERVER" value="true"/> |
463 |
</antcall> |
464 |
<antcall target="generate-report" inheritRefs="true"/> |
465 |
<antcall target="server-undeploy" inheritRefs="true"> |
466 |
<param name="application.name" value="servertest"/> |
467 |
</antcall> |
468 |
</target> |
469 |
|
470 |
|
284 |
</project> |
471 |
</project> |
|
|
472 |
|
473 |
|