View | Details | Raw Unified | Return to bug 290065 | Differences between
and this patch

Collapse All | Expand All

(-)eclipselink.jpa.spring.test/build.properties (-1 / +1 lines)
Lines 38-41 Link Here
38
spring.jlib.dir=../../../extension.lib.external/spring
38
spring.jlib.dir=../../../extension.lib.external/spring
39
# Spring 2.0 uses spring-mock.jar,commons-logging-1.1.1.jar, Spring 2.5 uses spring-test.jar, commons-logging.jar
39
# Spring 2.0 uses spring-mock.jar,commons-logging-1.1.1.jar, Spring 2.5 uses spring-test.jar, commons-logging.jar
40
# JTA tests use JOTM from JOTM website (compile only jar in Spring)
40
# JTA tests use JOTM from JOTM website (compile only jar in Spring)
41
spring.jlib=spring.jar,spring-mock.jar,spring-agent.jar,cglib-nodep-2.2.jar,cglib-nodep-2.1_3.jar,commons-logging-1.1.1.jar,spring-test.jar,commons-logging.jar,xapool.jar,jotm-client.jar
41
spring.jlib=spring.jar,spring-agent.jar,spring-test.jar,cglib-nodep-2.1_3.jar,commons-logging.jar,xapool.jar,jotm-client.jar
(-)eclipselink.jpa.test/build.properties (+3 lines)
Lines 62-67 Link Here
62
oracle.spatial.lib=sdoapi.jar
62
oracle.spatial.lib=sdoapi.jar
63
oracle.xdb.lib=xdb.jar
63
oracle.xdb.lib=xdb.jar
64
oracle.xmlparserv2.lib=xmlparserv2.jar
64
oracle.xmlparserv2.lib=xmlparserv2.jar
65
spring.jlib.dir=../../../extension.lib.external/spring
66
spring.jlib=spring.jar,spring-agent.jar,cglib-nodep-2.1_3.jar,commons-logging.jar,xapool.jar,jotm-client.jar
67
eclipselink.jpa.spring.test=../eclipselink.jpa.spring.test
65
68
66
eclipselink.tests.jar=eclipselink-tests.jar
69
eclipselink.tests.jar=eclipselink-tests.jar
67
70
(-)eclipselink.jpa.test/build.xml (-1 / +119 lines)
Lines 134-139 Link Here
134
        <contains string="${server.name}" substring="weblogic"/>
134
        <contains string="${server.name}" substring="weblogic"/>
135
    </condition>
135
    </condition>
136
136
137
    <!-- This checks if running against Spring -->
138
    <condition property="is.spring">
139
        <isset property="is.spring"/>
140
    </condition>
141
142
    <!-- Define Spring jars needed for running JPA tests on Spring -->
143
    <path id="spring.path">
144
            <fileset dir="${spring.jlib.dir}" includes="${spring.jlib}"/>
145
    </path>
146
137
    <!-- This checks if the Apllication Server is applicable to run oracle jpa/customfeatures model on oracle db-->
147
    <!-- This checks if the Apllication Server is applicable to run oracle jpa/customfeatures model on oracle db-->
138
    <condition property="run.jpa.customfeatures.model">
148
    <condition property="run.jpa.customfeatures.model">
139
        <and>
149
        <and>
Lines 148-154 Link Here
148
158
149
    <available file="${jpatest.2.common.plugins.dir}/${modelgen.processor.jar}" property="modelgen.jar.exist"/>
159
    <available file="${jpatest.2.common.plugins.dir}/${modelgen.processor.jar}" property="modelgen.jar.exist"/>
150
160
151
152
    <target name="set-app-name">
161
    <target name="set-app-name">
153
        <condition property="APP_NAME" value="">
162
        <condition property="APP_NAME" value="">
154
            <contains string="${server.name}" substring="websphere"/>
163
            <contains string="${server.name}" substring="websphere"/>
Lines 317-324 Link Here
317
                <path refid="compile.path"/>
326
                <path refid="compile.path"/>
318
            </classpath>
327
            </classpath>
319
        </javac>
328
        </javac>
329
        <antcall target="compile-springplatform" inheritRefs="true"/>
320
    </target>
330
    </target>
321
331
332
    <target name="compile-springplatform" if="is.spring">
333
        <javac srcdir="${eclipselink.jpa.spring.test}/${src.dir}"
334
               destdir="${eclipselink.jpa.test}/${classes.dir}"
335
               debug="${javac.debug}"
336
               debuglevel="${javac.debuglevel}"
337
               optimize="${javac.optimize}"
338
               source="${javac.version}"
339
               target="${javac.version}"
340
               deprecation="${javac.deprecation}"
341
               failonerror="true">
342
            <include name="org/eclipse/persistence/testing/framework/server/**"/>
343
            <classpath>
344
                <path refid="compile.path"/>
345
                <path refid="spring.path"/>
346
            </classpath>
347
        </javac>
348
    </target>
349
322
    <target name="compile-criteria" if="modelgen.created.classes.exist">
350
    <target name="compile-criteria" if="modelgen.created.classes.exist">
323
       <!--  Compile the Modelgen (criteria metamodel) Tests -->
351
       <!--  Compile the Modelgen (criteria metamodel) Tests -->
324
       <!--  *** Depends upon JPA Test Framework having been compiled already -->
352
       <!--  *** Depends upon JPA Test Framework having been compiled already -->
Lines 348-353 Link Here
348
        </jar>
376
        </jar>
349
    </target>
377
    </target>
350
378
379
    <!-- Copy Spring specified ***spring.xml, appContext.properties and persistence.xml to default build location-->
380
    <target name="prepare-spring-xmls" depends="init, config-trunk, config-flat" if="is.spring">
381
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}">
382
            <fileset dir="${eclipselink.jpa.spring.test}/resource/jpa-spring" includes="appContext.properties"/>
383
        </copy>
384
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbURL%%' value="${db.url}">
385
            <include name="appContext.properties"/>
386
        </replace>
387
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%driverClass%%' value="${db.driver}">
388
            <include name="appContext.properties"/>
389
        </replace>
390
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbUser%%' value="${db.user}">
391
            <include name="appContext.properties"/>
392
        </replace>
393
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbPassword%%' value="${db.pwd}">
394
            <include name="appContext.properties"/>
395
        </replace>
396
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbPlatform%%' value="${db.platform}">
397
            <include name="appContext.properties"/>
398
        </replace>
399
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}/META-INF" overwrite="true">
400
            <fileset dir="${eclipselink.jpa.test}/${resource.dir}/${MODEL_NAME}/spring" includes="persistence.xml"/>
401
        </copy>
402
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}">
403
            <fileset dir="${eclipselink.jpa.spring.test}/resource/jpa-spring" includes="**spring.xml"/>
404
        </copy>
405
    </target>
406
351
    <target name="package-annotation" depends="">
407
    <target name="package-annotation" depends="">
352
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}/META-INF">
408
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}/META-INF">
353
            <fileset dir="${eclipselink.jpa.test}/resource/${eclipselink.annotation.model}" includes="*.xml"/>
409
            <fileset dir="${eclipselink.jpa.test}/resource/${eclipselink.annotation.model}" includes="*.xml"/>
Lines 364-369 Link Here
364
                               org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**
420
                               org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**
365
                               org/eclipse/persistence/testing/models/weaving/**"/>
421
                               org/eclipse/persistence/testing/models/weaving/**"/>
366
        </copy>
422
        </copy>
423
        <antcall target="prepare-spring-xmls" inheritRefs="true">
424
            <param name="MODEL_NAME" value="${eclipselink.annotation.model}"/>
425
        </antcall>
367
        <jar jarfile="${eclipselink.jpa.test}/${eclipselink.annotation.model}.jar">
426
        <jar jarfile="${eclipselink.jpa.test}/${eclipselink.annotation.model}.jar">
368
            <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}">
427
            <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}">
369
            </fileset>
428
            </fileset>
Lines 471-476 Link Here
471
            <fileset dir="${eclipselink.jpa.test}/${classes.dir}"
530
            <fileset dir="${eclipselink.jpa.test}/${classes.dir}"
472
                     includes="org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**"/>
531
                     includes="org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**"/>
473
        </copy>
532
        </copy>
533
        <antcall target="prepare-spring-xmls" inheritRefs="true">
534
            <param name="MODEL_NAME" value="${eclipselink.advanced.field.access.model}"/>
535
        </antcall>
474
        <jar jarfile="${eclipselink.jpa.test}/${eclipselink.advanced.field.access.model}.jar">
536
        <jar jarfile="${eclipselink.jpa.test}/${eclipselink.advanced.field.access.model}.jar">
475
            <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.advanced.field.access.model}">
537
            <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.advanced.field.access.model}">
476
            </fileset>
538
            </fileset>
Lines 933-938 Link Here
933
        </java>
995
        </java>
934
    </target>
996
    </target>
935
997
998
    <!-- Runs jpa srg test on Spring. -->
999
    <target name="test-spring-srg" depends="clean-test, config-trunk, config-flat">
1000
        <antcall target="run-spring-test" inheritRefs="true">
1001
            <param name="TEST_CLASS" value="org.eclipse.persistence.testing.tests.jpa.fieldaccess.advanced.FAServerTestSuite"/>
1002
            <param name="TEST_AGENT" value="-javaagent:../${spring.jlib.dir}/spring-agent.jar"/>
1003
            <param name="TEST_WEAVING" value="-DTEST_NO_WEAVING=true"/>
1004
            <param name="ORM_TESTING" value="-Dorm.testing=jpa"/>
1005
            <param name="RUN_PATH" value="run.classpath"/>
1006
            <param name="DB_URL" value="${db.url}"/>
1007
        </antcall>
1008
        <antcall target="run-spring-test" inheritRefs="true">
1009
            <param name="TEST_CLASS" value="org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite"/>
1010
            <param name="TEST_AGENT" value="-javaagent:../${spring.jlib.dir}/spring-agent.jar"/>
1011
            <param name="TEST_WEAVING" value="-DTEST_NO_WEAVING=true"/>
1012
            <param name="ORM_TESTING" value="-Dorm.testing=jpa"/>
1013
            <param name="RUN_PATH" value="run.classpath"/>
1014
            <param name="DB_URL" value="${db.url}"/>
1015
        </antcall>
1016
        <antcall target="generate-report" inheritRefs="true"/>
1017
    </target>
1018
936
    <!-- Generic target for running tests. -->
1019
    <!-- Generic target for running tests. -->
937
    <target name="run-test" depends="config-trunk, config-flat">
1020
    <target name="run-test" depends="config-trunk, config-flat">
938
        <echo>Running test on ${DB_URL}</echo>
1021
        <echo>Running test on ${DB_URL}</echo>
Lines 966-971 Link Here
966
        </junit>
1049
        </junit>
967
    </target>
1050
    </target>
968
1051
1052
    <!-- Generic target for running spring tests. -->
1053
    <target name="run-spring-test" depends="config-trunk, config-flat">
1054
        <echo>Running test on ${DB_URL}</echo>
1055
1056
        <condition property="jvmarg.db.platform" value="-Ddb.platform=${db.platform}">
1057
            <isset property="db.platform"/>
1058
        </condition>
1059
        <condition property="jvmarg.db.platform" value="-Ddummy=dummy">
1060
            <not>
1061
                <isset property="db.platform"/>
1062
            </not>
1063
        </condition>
1064
1065
        <junit printsummary="yes" haltonfailure="yes" fork="yes" showoutput="true" maxmemory="512m" dir="${eclipselink.jpa.test}/${run.dir}">
1066
            <sysproperty key="TEST_SERVER_PLATFORM" value="org.eclipse.persistence.testing.framework.server.SpringPlatform"/>
1067
            <sysproperty key="proxy.user.name" value="${oracle.proxy.user}"/>
1068
            <jvmarg value="${TEST_AGENT}"/>
1069
            <jvmarg value="${TEST_WEAVING}"/>
1070
            <jvmarg value="${ORM_TESTING}"/>
1071
            <jvmarg value="-Declipselink.logging.level=${logging.level}"/>
1072
            <jvmarg value="-Ddb.driver=${db.driver}"/>
1073
            <jvmarg value="-Ddb.url=${DB_URL}"/>
1074
            <jvmarg value="-Ddb.user=${db.user}"/>
1075
            <jvmarg value="-Ddb.pwd=${db.pwd}"/>
1076
            <jvmarg value="${jvmarg.db.platform}"/>
1077
            <classpath>
1078
                <path refid="${RUN_PATH}"/>
1079
                <path refid="spring.path"/>
1080
            </classpath>
1081
            <formatter type="xml"/>
1082
            <test name="${TEST_CLASS}" haltonfailure="no" outfile="${eclipselink.jpa.test}/${report.dir}/${TEST_CLASS}-test-results">
1083
            </test>
1084
        </junit>
1085
    </target>
1086
969
    <target name="generate-report">
1087
    <target name="generate-report">
970
        <junitreport todir="${eclipselink.jpa.test}/${report.dir}">
1088
        <junitreport todir="${eclipselink.jpa.test}/${report.dir}">
971
            <fileset dir="${eclipselink.jpa.test}/${report.dir}">
1089
            <fileset dir="${eclipselink.jpa.test}/${report.dir}">
(-)eclipselink.jpa.test/test.properties (+3 lines)
Lines 48-53 Link Here
48
# A property specifying if PromptTestRunner should save the test results to the database
48
# A property specifying if PromptTestRunner should save the test results to the database
49
should.save.results=false
49
should.save.results=false
50
50
51
# A property to specify if running JPA tests against Spring
52
#is.spring=true
53
51
# The baseline version that the performance tests will compare this version with.
54
# The baseline version that the performance tests will compare this version with.
52
# By default, it is the version that the last success runs were against.
55
# By default, it is the version that the last success runs were against.
53
# To this version as a baseline, you can specify a non-existing baseline version and run the performance tests.
56
# To this version as a baseline, you can specify a non-existing baseline version and run the performance tests.

Return to bug 290065