Author: dwoods
Date: Fri Sep 17 13:46:00 2010
New Revision: 998130
URL: http://svn.apache.org/viewvc?rev=998130&view=rev
Log:
OPENJPA-1786 merged in from trunk TCK updates to jpatck-2.0_15-Jun-2010
Modified:
openjpa/branches/2.0.x/openjpa-integration/tck/pom.xml
openjpa/branches/2.0.x/openjpa-integration/tck/tck2.xml
openjpa/branches/2.0.x/pom.xml
Modified: openjpa/branches/2.0.x/openjpa-integration/tck/pom.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-integration/tck/pom.xml?rev=998130&r1=998129&r2=998130&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-integration/tck/pom.xml (original)
+++ openjpa/branches/2.0.x/openjpa-integration/tck/pom.xml Fri Sep 17 13:46:00
2010
@@ -25,7 +25,7 @@
For JPA 1.0 -
${user.home}/.m2/privaterepos/jpa-1_0b-tck.zip
For JPA 2.0 -
- ${user.home}/.m2/privaterepos/jpatck-2.0_09-Dec-2009.zip
+ ${user.home}/.m2/privaterepos/jpatck-2.0_15-Jun-2010.zip
If you have that file in a different location, it can be specified with
the "tck.zip" system property.
@@ -180,10 +180,6 @@
</path>
<ant antfile="${basedir}/tck2.xml" inheritRefs="true">
- <target name="run-pluggability" />
- </ant>
-
- <ant antfile="${basedir}/tck2.xml" inheritRefs="true">
<target name="run-tck" />
</ant>
</tasks>
Modified: openjpa/branches/2.0.x/openjpa-integration/tck/tck2.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-integration/tck/tck2.xml?rev=998130&r1=998129&r2=998130&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-integration/tck/tck2.xml (original)
+++ openjpa/branches/2.0.x/openjpa-integration/tck/tck2.xml Fri Sep 17 13:46:00
2010
@@ -22,9 +22,9 @@
This ANT build file is used to run the JPA 2.0 TCK. It assumes that you
have
the TCK, config and patches zip files located at:
- ${user.home}/.m2/privaterepos/jpatck-2.0_09-Dec-2009.zip
- ${user.home}/.m2/privaterepos/jpatck-2.0_09-Dec-2009_config.zip
- ${user.home}/.m2/privaterepos/jpatck-2.0_09-Dec-2009_patches.zip
+ ${user.home}/.m2/privaterepos/jpatck-2.0_15-Jun-2010.zip
+ ${user.home}/.m2/privaterepos/jpatck-2.0_15-Jun-2010_config.zip
+ ${user.home}/.m2/privaterepos/jpatck-2.0_15-Jun-2010_patches.zip
If you have that file in a different location, it can be specified with
the "tck.zip" and "tck_patches.zip" system property.
@@ -45,6 +45,8 @@
-->
<project name="JPA2TCK" default="run-tck">
+ <!-- Import ant-contrib for If/then/else support -->
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<!--
Target: init
@@ -53,7 +55,7 @@
then extracts them.
-->
<target name="init">
- <property name="tck.level" value="jpatck-2.0_09-Dec-2009" />
+ <property name="tck.level" value="jpatck-2.0_15-Jun-2010" />
<property name="tck.zip"
value="${LOCAL_M2_REPO}/../privaterepos/${tck.level}.zip" />
<available property="tck.available" file="${tck.zip}" />
<fail unless="tck.available">The TCK file specified in the "tck.zip"
system property (${tck.zip}) does not exist. This file must be downloaded
separately in order to be able to run the JPA 2.0 TCK</fail>
@@ -201,10 +203,11 @@ databaseName=${db.name}
Macro for the TCK harness launcher
-->
<macrodef name="tsant">
+ <attribute name="dir" default="${tck.dir}/src" />
<attribute name="buildfile" />
<attribute name="target" />
<sequential>
- <java classname="org.apache.tools.ant.launch.Launcher" fork="true"
failonerror="false" dir="${tck.dir}/src" append="true" output="${tck.log}"
timeout="7200000" resultproperty="tsant.result">
+ <java classname="org.apache.tools.ant.launch.Launcher" fork="true"
failonerror="false" dir="@{dir}" append="true" output="${tck.log}"
timeout="7200000" resultproperty="tsant.result">
<arg value="-emacs" />
<arg value="-buildfile" />
<arg value="@{buildfile}" />
@@ -220,8 +223,8 @@ databaseName=${db.name}
<env key="ANT_HOME" value="${tck.dir}/tools/ant" />
<sysproperty key="ant.home" value="${tck.dir}/tools/ant" />
- <sysproperty key="pkg.dir" value="${jpatck.pkg.dir}" />
<!--
+ <sysproperty key="pkg.dir" value="${jpatck.pkg.dir}" />
<sysproperty key="test" value="${jpatck.test}" />
-->
@@ -280,9 +283,8 @@ databaseName=${db.name}
all other setup steps have been performed.
-->
<target name="run-tck">
- <echo>Running Sun JPA 2.0 TCK - w/o Pluggability tests</echo>
+ <echo>Running JPA 2.0 TCK tests</echo>
<echo>Init must have been called before running this target!</echo>
- <property name="jpatck.pkg.dir" value="com" />
<property name="tck.log" value="${tck.base}/openjpa-tck.log" />
<property name="provider.properties" value="${openjpa.properties}" />
@@ -292,66 +294,14 @@ databaseName=${db.name}
<param name="cp.property" value="${OPENJPA_CLASSPATH}" />
</antcall>
- <!-- Need to exclude Pluggability tests from a normal run,
- due to the need for Toplink.
- -->
- <echo append="false" file="${tck.dir}/bin/ts.jtx">
-
-## exclude pluggability tests for normal OpenJPA runs
-com/sun/ts/tests/pluggability/contracts/Client.java#createContainerEntityManagerFactory_from_standalone
-com/sun/ts/tests/pluggability/contracts/Client.java#getManagedClassNames_from_standalone
-com/sun/ts/tests/pluggability/contracts/Client.java#getPersistenceProviderClassName_from_standalone
-com/sun/ts/tests/pluggability/contracts/Client.java#getPersistenceUnitName_from_standalone
-com/sun/ts/tests/pluggability/contracts/Client.java#getTransactionType_from_standalone
-
- </echo>
-
<!-- backup our updated ts.jte for later debugging -->
<copy overwrite="true"
file="${tck.dir}/bin/ts.jte" tofile="${tck.base}/ts.jte.tck" />
- <!-- first initialize the database -->
- <echo>Calling TCK initdb.xml</echo>
- <tsant buildfile="${tck.dir}/bin/initdb.xml" target="init.database" />
- <echo>TCK initdb.xml returned result=${tsant.result}</echo>
-
- <!-- now run the TCK -->
- <echo>Calling TCK build.xml</echo>
- <tsant buildfile="${tck.dir}/bin/build.xml" target="runclient" />
- <echo>TCK build.xml returned result=${tsant.result}</echo>
-
- <!-- archive the results and check for test failures -->
- <antcall target="zip-artifacts">
- <param name="results.name" value="tck" />
- </antcall>
- </target>
-
-
- <!--
- Target: run-pluggability
- Description: This runs just the pluggability bucket, which requires
- us to add the toplink provider on the classpath
- -->
- <target name="run-pluggability">
- <echo>Running Sun JPA 2.0 TCK - only Pluggability tests</echo>
- <echo>Init must have been called before running this target!</echo>
- <property name="jpatck.pkg.dir" value="com/sun/ts/tests/pluggability"
/>
- <property name="tck.log" value="${tck.base}/openjpa-pluggability.log"
/>
- <property name="provider.properties" value="${toplink.properties}" />
-
- <!-- call TCK setup with above run specific properties set -->
- <fail unless="TOPLINK_CLASSPATH">The TOPLINK_CLASSPATH was not
provided and needs to point to the required Toplink, OpenJPA and Derby runtime
jars.</fail>
- <antcall target="setup">
- <param name="cp.property" value="${TOPLINK_CLASSPATH}" />
- </antcall>
-
- <!-- backup our updated ts.jte for later debugging -->
- <copy overwrite="true"
- file="${tck.dir}/bin/ts.jte"
tofile="${tck.base}/ts.jte.pluggability" />
-
- <!-- Restore any exclude file that was provided in the zip file -->
- <copy overwrite="true"
- file="${tck.dir}/bin/ts.jtx.orig" tofile="${tck.dir}/bin/ts.jtx" />
+ <!-- HACK - rebuild jpatck/dist jars for persistence.xml fixes -->
+ <echo>Calling TCK build.all</echo>
+ <tsant buildfile="${tck.dir}/bin/build.xml" target="build.all" />
+ <echo>TCK build.all returned result=${tsant.result}</echo>
<!-- first initialize the database -->
<echo>Calling TCK initdb.xml</echo>
@@ -359,13 +309,24 @@ com/sun/ts/tests/pluggability/contracts/
<echo>TCK initdb.xml returned result=${tsant.result}</echo>
<!-- now run the TCK -->
- <echo>Calling TCK build.xml</echo>
- <tsant buildfile="${tck.dir}/bin/build.xml" target="runclient" />
+ <if>
+ <isset property="jpatck.pkg.dir" />
+ <then>
+ <echo>Calling TCK build.xml for pkg.dir=${jpatck.pkg.dir}</echo>
+ <property name="dir" value="${tck.dir}/src/${jpatck.pkg.dir}" />
+ <tsant dir="${dir}" buildfile="${dir}/build.xml"
target="runclient" />
+ </then>
+ <else>
+ <echo>Calling TCK build.xml for ALL tests</echo>
+ <tsant buildfile="${tck.dir}/bin/build.xml" target="run.all.tests"
/>
+ </else>
+ </if>
+
<echo>TCK build.xml returned result=${tsant.result}</echo>
<!-- archive the results and check for test failures -->
<antcall target="zip-artifacts">
- <param name="results.name" value="pluggability" />
+ <param name="results.name" value="tck" />
</antcall>
</target>
Modified: openjpa/branches/2.0.x/pom.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.0.x/pom.xml?rev=998130&r1=998129&r2=998130&view=diff
==============================================================================
--- openjpa/branches/2.0.x/pom.xml (original)
+++ openjpa/branches/2.0.x/pom.xml Fri Sep 17 13:46:00 2010
@@ -726,6 +726,11 @@
<artifactId>ant-jsch</artifactId>
<version>1.7.0</version>
</dependency>
+ <dependency>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <version>1.0b3</version>
+ </dependency>
</dependencies>
</plugin>
<plugin>