Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 147793 Details for
Bug 290065
add ant targets in jpa/eclipselink.jpa.test/build.xml to make exisitng JPA tests running against Spring
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
updated build.xml and test.properties
bug290065_new.patch (text/plain), 11.08 KB, created by
Yiping Zhao
on 2009-09-22 11:43:47 EDT
(
hide
)
Description:
updated build.xml and test.properties
Filename:
MIME Type:
Creator:
Yiping Zhao
Created:
2009-09-22 11:43:47 EDT
Size:
11.08 KB
patch
obsolete
>Index: eclipselink.jpa.spring.test/build.properties >=================================================================== >--- eclipselink.jpa.spring.test/build.properties (revision 5201) >+++ eclipselink.jpa.spring.test/build.properties (working copy) >@@ -38,4 +38,4 @@ > spring.jlib.dir=../../../extension.lib.external/spring > # Spring 2.0 uses spring-mock.jar,commons-logging-1.1.1.jar, Spring 2.5 uses spring-test.jar, commons-logging.jar > # JTA tests use JOTM from JOTM website (compile only jar in Spring) >-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 >+spring.jlib=spring.jar,spring-agent.jar,spring-test.jar,cglib-nodep-2.1_3.jar,commons-logging.jar,xapool.jar,jotm-client.jar >Index: eclipselink.jpa.test/build.properties >=================================================================== >--- eclipselink.jpa.test/build.properties (revision 5201) >+++ eclipselink.jpa.test/build.properties (working copy) >@@ -62,6 +62,9 @@ > oracle.spatial.lib=sdoapi.jar > oracle.xdb.lib=xdb.jar > oracle.xmlparserv2.lib=xmlparserv2.jar >+spring.jlib.dir=../../../extension.lib.external/spring >+spring.jlib=spring.jar,spring-agent.jar,cglib-nodep-2.1_3.jar,commons-logging.jar,xapool.jar,jotm-client.jar >+eclipselink.jpa.spring.test=../eclipselink.jpa.spring.test > > eclipselink.tests.jar=eclipselink-tests.jar > >Index: eclipselink.jpa.test/build.xml >=================================================================== >--- eclipselink.jpa.test/build.xml (revision 5201) >+++ eclipselink.jpa.test/build.xml (working copy) >@@ -134,6 +134,16 @@ > <contains string="${server.name}" substring="weblogic"/> > </condition> > >+ <!-- This checks if running against Spring --> >+ <condition property="is.spring"> >+ <isset property="is.spring"/> >+ </condition> >+ >+ <!-- Define Spring jars needed for running JPA tests on Spring --> >+ <path id="spring.path"> >+ <fileset dir="${spring.jlib.dir}" includes="${spring.jlib}"/> >+ </path> >+ > <!-- This checks if the Apllication Server is applicable to run oracle jpa/customfeatures model on oracle db--> > <condition property="run.jpa.customfeatures.model"> > <and> >@@ -148,7 +158,6 @@ > > <available file="${jpatest.2.common.plugins.dir}/${modelgen.processor.jar}" property="modelgen.jar.exist"/> > >- > <target name="set-app-name"> > <condition property="APP_NAME" value=""> > <contains string="${server.name}" substring="websphere"/> >@@ -317,8 +326,27 @@ > <path refid="compile.path"/> > </classpath> > </javac> >+ <antcall target="compile-springplatform" inheritRefs="true"/> > </target> > >+ <target name="compile-springplatform" if="is.spring"> >+ <javac srcdir="${eclipselink.jpa.spring.test}/${src.dir}" >+ destdir="${eclipselink.jpa.test}/${classes.dir}" >+ debug="${javac.debug}" >+ debuglevel="${javac.debuglevel}" >+ optimize="${javac.optimize}" >+ source="${javac.version}" >+ target="${javac.version}" >+ deprecation="${javac.deprecation}" >+ failonerror="true"> >+ <include name="org/eclipse/persistence/testing/framework/server/**"/> >+ <classpath> >+ <path refid="compile.path"/> >+ <path refid="spring.path"/> >+ </classpath> >+ </javac> >+ </target> >+ > <target name="compile-criteria" if="modelgen.created.classes.exist"> > <!-- Compile the Modelgen (criteria metamodel) Tests --> > <!-- *** Depends upon JPA Test Framework having been compiled already --> >@@ -348,6 +376,34 @@ > </jar> > </target> > >+ <!-- Copy Spring specified ***spring.xml, appContext.properties and persistence.xml to default build location--> >+ <target name="prepare-spring-xmls" depends="init, config-trunk, config-flat" if="is.spring"> >+ <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}"> >+ <fileset dir="${eclipselink.jpa.spring.test}/resource/jpa-spring" includes="appContext.properties"/> >+ </copy> >+ <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbURL%%' value="${db.url}"> >+ <include name="appContext.properties"/> >+ </replace> >+ <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%driverClass%%' value="${db.driver}"> >+ <include name="appContext.properties"/> >+ </replace> >+ <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbUser%%' value="${db.user}"> >+ <include name="appContext.properties"/> >+ </replace> >+ <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbPassword%%' value="${db.pwd}"> >+ <include name="appContext.properties"/> >+ </replace> >+ <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbPlatform%%' value="${db.platform}"> >+ <include name="appContext.properties"/> >+ </replace> >+ <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}/META-INF" overwrite="true"> >+ <fileset dir="${eclipselink.jpa.test}/${resource.dir}/${MODEL_NAME}/spring" includes="persistence.xml"/> >+ </copy> >+ <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}"> >+ <fileset dir="${eclipselink.jpa.spring.test}/resource/jpa-spring" includes="**spring.xml"/> >+ </copy> >+ </target> >+ > <target name="package-annotation" depends=""> > <copy todir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}/META-INF"> > <fileset dir="${eclipselink.jpa.test}/resource/${eclipselink.annotation.model}" includes="*.xml"/> >@@ -364,6 +420,9 @@ > org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/** > org/eclipse/persistence/testing/models/weaving/**"/> > </copy> >+ <antcall target="prepare-spring-xmls" inheritRefs="true"> >+ <param name="MODEL_NAME" value="${eclipselink.annotation.model}"/> >+ </antcall> > <jar jarfile="${eclipselink.jpa.test}/${eclipselink.annotation.model}.jar"> > <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}"> > </fileset> >@@ -471,6 +530,9 @@ > <fileset dir="${eclipselink.jpa.test}/${classes.dir}" > includes="org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**"/> > </copy> >+ <antcall target="prepare-spring-xmls" inheritRefs="true"> >+ <param name="MODEL_NAME" value="${eclipselink.advanced.field.access.model}"/> >+ </antcall> > <jar jarfile="${eclipselink.jpa.test}/${eclipselink.advanced.field.access.model}.jar"> > <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.advanced.field.access.model}"> > </fileset> >@@ -933,6 +995,27 @@ > </java> > </target> > >+ <!-- Runs jpa srg test on Spring. --> >+ <target name="test-spring-srg" depends="clean-test, config-trunk, config-flat"> >+ <antcall target="run-spring-test" inheritRefs="true"> >+ <param name="TEST_CLASS" value="org.eclipse.persistence.testing.tests.jpa.fieldaccess.advanced.FAServerTestSuite"/> >+ <param name="TEST_AGENT" value="-javaagent:../${spring.jlib.dir}/spring-agent.jar"/> >+ <param name="TEST_WEAVING" value="-DTEST_NO_WEAVING=true"/> >+ <param name="ORM_TESTING" value="-Dorm.testing=jpa"/> >+ <param name="RUN_PATH" value="run.classpath"/> >+ <param name="DB_URL" value="${db.url}"/> >+ </antcall> >+ <antcall target="run-spring-test" inheritRefs="true"> >+ <param name="TEST_CLASS" value="org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite"/> >+ <param name="TEST_AGENT" value="-javaagent:../${spring.jlib.dir}/spring-agent.jar"/> >+ <param name="TEST_WEAVING" value="-DTEST_NO_WEAVING=true"/> >+ <param name="ORM_TESTING" value="-Dorm.testing=jpa"/> >+ <param name="RUN_PATH" value="run.classpath"/> >+ <param name="DB_URL" value="${db.url}"/> >+ </antcall> >+ <antcall target="generate-report" inheritRefs="true"/> >+ </target> >+ > <!-- Generic target for running tests. --> > <target name="run-test" depends="config-trunk, config-flat"> > <echo>Running test on ${DB_URL}</echo> >@@ -966,6 +1049,41 @@ > </junit> > </target> > >+ <!-- Generic target for running spring tests. --> >+ <target name="run-spring-test" depends="config-trunk, config-flat"> >+ <echo>Running test on ${DB_URL}</echo> >+ >+ <condition property="jvmarg.db.platform" value="-Ddb.platform=${db.platform}"> >+ <isset property="db.platform"/> >+ </condition> >+ <condition property="jvmarg.db.platform" value="-Ddummy=dummy"> >+ <not> >+ <isset property="db.platform"/> >+ </not> >+ </condition> >+ >+ <junit printsummary="yes" haltonfailure="yes" fork="yes" showoutput="true" maxmemory="512m" dir="${eclipselink.jpa.test}/${run.dir}"> >+ <sysproperty key="TEST_SERVER_PLATFORM" value="org.eclipse.persistence.testing.framework.server.SpringPlatform"/> >+ <sysproperty key="proxy.user.name" value="${oracle.proxy.user}"/> >+ <jvmarg value="${TEST_AGENT}"/> >+ <jvmarg value="${TEST_WEAVING}"/> >+ <jvmarg value="${ORM_TESTING}"/> >+ <jvmarg value="-Declipselink.logging.level=${logging.level}"/> >+ <jvmarg value="-Ddb.driver=${db.driver}"/> >+ <jvmarg value="-Ddb.url=${DB_URL}"/> >+ <jvmarg value="-Ddb.user=${db.user}"/> >+ <jvmarg value="-Ddb.pwd=${db.pwd}"/> >+ <jvmarg value="${jvmarg.db.platform}"/> >+ <classpath> >+ <path refid="${RUN_PATH}"/> >+ <path refid="spring.path"/> >+ </classpath> >+ <formatter type="xml"/> >+ <test name="${TEST_CLASS}" haltonfailure="no" outfile="${eclipselink.jpa.test}/${report.dir}/${TEST_CLASS}-test-results"> >+ </test> >+ </junit> >+ </target> >+ > <target name="generate-report"> > <junitreport todir="${eclipselink.jpa.test}/${report.dir}"> > <fileset dir="${eclipselink.jpa.test}/${report.dir}"> >Index: eclipselink.jpa.test/test.properties >=================================================================== >--- eclipselink.jpa.test/test.properties (revision 5201) >+++ eclipselink.jpa.test/test.properties (working copy) >@@ -48,6 +48,9 @@ > # A property specifying if PromptTestRunner should save the test results to the database > should.save.results=false > >+# A property to specify if running JPA tests against Spring >+#is.spring=true >+ > # The baseline version that the performance tests will compare this version with. > # By default, it is the version that the last success runs were against. > # To this version as a baseline, you can specify a non-existing baseline version and run the performance tests.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 290065
:
147774
| 147793