Author: mbo
Date: Sat Apr 16 14:37:53 2005
New Revision: 161611

URL: http://svn.apache.org/viewcvs?view=rev&rev=161611
Log:
Changed tck11 to have the same structure as tck20: TCK code now treated as src, 
not test. Can compile and run a single test. (Related tck20 JIRA issues JDO-3, 
12)

Modified:
    incubator/jdo/trunk/tck11/maven.xml
    incubator/jdo/trunk/tck11/project.properties
    incubator/jdo/trunk/tck11/project.xml

Modified: incubator/jdo/trunk/tck11/maven.xml
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/maven.xml?view=diff&r1=161610&r2=161611
==============================================================================
--- incubator/jdo/trunk/tck11/maven.xml (original)
+++ incubator/jdo/trunk/tck11/maven.xml Sat Apr 16 14:37:53 2005
@@ -26,11 +26,12 @@
     <!-- ==================== -->
 
     <goal name="default">
-        <attainGoal name="jar:install"/>
+        <attainGoal name="jar:install-snapshot"/>
     </goal>
 
     <goal name="build">
         <attainGoal name="default"/>
+        <attainGoal name="runtck.jdori"/>
     </goal>
 
     <goal name="rebuild">
@@ -38,15 +39,6 @@
         <attainGoal name="build"/>
     </goal>
 
-    <postGoal name="test:prepare-filesystem">
-        <mkdir dir="${jdo.tck.testdir}"/>
-    </postGoal>
-
-    <preGoal name="test:test">
-        <attainGoal name="jdorienhance"/>
-        <attainGoal name="database"/>
-    </preGoal>
-
     <goal name="clobber" prereqs="clean">
         <delete>
             <fileset dir="." defaultexcludes="no" includes="**/*~"/>
@@ -57,9 +49,8 @@
     <!-- Running test cases -->
     <!-- ================== -->
 
-
-    <goal name="runtck" prereqs="enhance, testrunner.set, database, 
copyloggingprops">
-        <echo>Run JDO TCK with configuration ${jdo.tck.configuration}</echo>
+    <goal name="runtck" prereqs="java:compile, enhance, testrunner.set, 
database, copyloggingprops">
+        <echo>Run JDO TCK on the IUT with configuration 
${jdo.tck.configuration}</echo>
         <java fork="yes" dir="${jdo.tck.testdir}" 
               classname="${jdo.tck.testrunnerclass}">
             <classpath refid="project.class.path"/>
@@ -75,8 +66,8 @@
     <!-- Run a single tck test. The property testcase defines the name of -->
     <!-- the tck test class w/o the prefix org.apache.jdo.tck, e.g.       --> 
     <!--   maven -Dtest=api.jdohelper.GetObjectId runtck.single       -->
-    <goal name="runtck.single" prereqs="enhance, testrunner.set, database, 
copyloggingprops">
-        <echo>Run tck test org.apache.jdo.tck.${test}</echo>
+    <goal name="runtck.single" prereqs="java:compile, enhance, testrunner.set, 
database, copyloggingprops">
+        <echo>Run TCK test org.apache.jdo.tck.${test} on the IUT with 
configuration ${jdo.tck.configuration}</echo>
         <java fork="yes" dir="${jdo.tck.testdir}" 
               classname="org.apache.jdo.tck.${test}">
             <classpath refid="project.class.path"/>
@@ -88,9 +79,38 @@
         </java>
     </goal>
 
-    <!-- ================ -->
-    <!-- Enhancer support -->
-    <!-- ================ -->
+    <goal name="runtck.jdori" prereqs="java:compile, jdorienhance, database, 
copyloggingprops">
+        <echo>Run JDO TCK on the RI with configuration 
${jdo.tck.configuration}</echo>
+        <j:set var="jdo.tck.testrunnerclass" 
value="org.apache.jdo.tck.util.BatchTestRunner"/>
+        <java fork="yes" dir="${jdo.tck.testdir}" 
+              classname="${jdo.tck.testrunnerclass}">
+            <classpath refid="jdori.class.path"/>
+            <sysproperty key="ResultPrinterClass" 
value="${jdo.tck.resultprinterclass}"/>
+            <sysproperty key="verbose" value="${verbose}"/>
+            <sysproperty key="PMFProperties" 
value="${basedir}/test/conf/jdori.properties"/>
+            <sysproperty key="PMF2Properties" 
value="${basedir}/test/conf/jdori2.properties"/>
+            <arg line="${jdo.tck.alltests}"/>
+        </java>
+    </goal>
+
+    <!-- Run a single tck test. The property testcase defines the name of -->
+    <!-- the tck test class w/o the prefix org.apache.jdo.tck, e.g.       --> 
+    <!--   maven -Dtest=api.jdohelper.GetObjectId runtck.single       -->
+    <goal name="runtck.jdorisingle" prereqs="java:compile, jdorienhance, 
database, copyloggingprops">
+        <echo>Run TCK test org.apache.jdo.tck.${test} on the RI with 
configuration ${jdo.tck.configuration}</echo>
+        <java fork="yes" dir="${jdo.tck.testdir}" 
+              classname="org.apache.jdo.tck.${test}">
+            <classpath refid="jdori.class.path"/>
+            <sysproperty key="ResultPrinterClass" 
value="${jdo.tck.resultprinterclass}"/>
+            <sysproperty key="verbose" value="${verbose}"/>
+            <sysproperty key="PMFProperties" 
value="${basedir}/test/conf/jdori.properties"/>
+            <sysproperty key="PMF2Properties" 
value="${basedir}/test/conf/jdori2.properties"/>
+        </java>
+    </goal>
+
+    <!-- ==================== -->
+    <!-- IUT Enhancer support -->
+    <!-- ==================== -->
 
     <goal name="enhance">
         <attainGoal name="enhance.applicationidentity"/> 
@@ -149,9 +169,10 @@
 
     <preGoal name="enhance.run">
         <!-- copy metadata -->
+        <mkdir dir="${iut.enhanced.dir}" />
         <copy todir="${iut.enhanced.dir}">
             <fileset dir="${basedir}/test/jdo/${identitytype}"
-                     includes="**/*.jdo, **/*.jdoTest.properties"/>
+                     includes="**/*.jdo, **/jdoTest.properties"/>
         </copy>
         <!-- compile pc and pa classes -->
         <javac srcdir="${basedir}/test/java"
@@ -167,7 +188,7 @@
         <java fork="yes" failonerror="yes" 
               dir="${iut.enhanced.dir}"
               classname="${iut.enhancer.main}"
-              classpathref="project.class.path">
+              classpath="${iut.enhancer.classpath}">
              <jvmarg line="${iut.enhancer.sysproperties}"/>
              <arg line="${iut.enhancer.options}"/>
              <arg line="${iut.enhancer.args}"/>
@@ -178,21 +199,84 @@
         <delete file="${iut.enhanced.dir}/${identitytype}.jar"/>
         <jar jarfile="${iut.enhanced.dir}/${identitytype}.jar">
             <fileset dir="${iut.enhanced.dir}" 
-                     includes="**/*.class, **/*.jdo, **/jdoTest.properties"/>
+                 includes="**/*.class, **/*.jdo, **/jdoTest.properties"/>
         </jar>
         <delete dir="${iut.enhanced.dir}/org"/>
     </postGoal>
 
-    <preGoal name="jdorienhance">
-        <copy todir="${jdo.tck.testclasses.dir}">
-            <fileset dir="${basedir}/test/jdo/datastoreidentity" 
-                     includes="**/*jdoTest.properties, **/*.jdo"/>
+    <!-- ====================== -->
+    <!-- JDORI Enhancer support -->
+    <!-- ====================== -->
+
+    <goal name="jdorienhance">
+        <attainGoal name="jdorienhance.applicationidentity"/> 
+        <attainGoal name="jdorienhance.datastoreidentity"/>
+    </goal>
+
+    <preGoal name="jdorienhance.applicationidentity">
+        <condition property="jdorienhancement.required">
+            <not>
+                <uptodate 
targetfile="${jdo.enhanced.dir}/applicationidentity.jar">
+                    <srcfiles dir="${basedir}/test/jdo/applicationidentity"
+                              includes="org/apache/jdo/tck/pc/**/*.jdo, 
+                                        
org/apache/jdo/tck/pc/**/jdoTest.properties"/>
+                    <srcfiles dir="${basedir}/test/java"
+                              includes="${jdo.tck.pcclasses.sources}
+                                        ${jdo.tck.paclasses.sources}"/>
+                </uptodate>
+            </not>
+        </condition>
+    </preGoal>
+
+    <goal name="jdorienhance.applicationidentity">
+        <j:if test="${jdorienhancement.required}">
+            <j:set var="identitytype" value="applicationidentity"/>
+            <attainGoal name="jdorienhance.run"/>
+        </j:if>
+    </goal>
+
+    <preGoal name="jdorienhance.datastoreidentity">
+        <condition property="jdorienhancement.required">
+            <not>
+                <uptodate 
targetfile="${jdo.enhanced.dir}/datastoreidentity.jar">
+                    <srcfiles dir="${basedir}/test/jdo/datastoreidentity"
+                              includes="org/apache/jdo/tck/pc/**/*.jdo, 
+                                        
org/apache/jdo/tck/pc/**/jdoTest.properties"/>
+                    <srcfiles dir="${basedir}/test/java"
+                              includes="${jdo.tck.pcclasses.sources}
+                                        ${jdo.tck.paclasses.sources}"/>
+                </uptodate>
+            </not>
+        </condition>
+    </preGoal>
+
+    <goal name="jdorienhance.datastoreidentity">
+        <j:if test="${jdorienhancement.required}">
+            <j:set var="identitytype" value="datastoreidentity"/>
+            <attainGoal name="jdorienhance.run"/>
+        </j:if>
+    </goal>
+
+    <preGoal name="jdorienhance.run">
+        <mkdir dir="${jdo.enhanced.dir}" />
+        <!-- copy metadata -->
+        <copy todir="${jdo.enhanced.dir}">
+            <fileset dir="${basedir}/test/jdo/${identitytype}"
+                     includes="**/*.jdo, **/jdoTest.properties"/>
         </copy>
+        <!-- compile pc and pa classes -->
+        <javac srcdir="${basedir}/test/java"
+               includes="${jdo.tck.pcclasses.sources} 
${jdo.tck.paclasses.sources}"
+               destdir="${jdo.enhanced.dir}"
+               debug="on"
+               classpathref="jdori.class.path">
+        </javac>
     </preGoal>
 
-    <goal name="jdorienhance">
+    <goal name="jdorienhance.run">
         <echo>Run JDORI enhancer</echo>
-        <java fork="yes" failonerror="yes" dir="${jdo.tck.testclasses.dir}"
+        <java fork="yes" failonerror="yes" 
+              dir="${jdo.enhanced.dir}"
               classname="${jdo.enhancer.main}"
               classpath="${jdo.enhancer.classpath}">
              <arg line="${jdo.enhancer.options}"/>
@@ -200,6 +284,15 @@
         </java>
     </goal>
 
+    <postGoal name="jdorienhance.run">
+        <delete file="${jdo.enhanced.dir}/${identitytype}.jar"/>
+        <jar jarfile="${jdo.enhanced.dir}/${identitytype}.jar">
+            <fileset dir="${jdo.enhanced.dir}" 
+                 includes="**/*.class, **/*.jdo, **/jdoTest.properties"/>
+        </jar>
+        <delete dir="${jdo.enhanced.dir}/org"/>
+    </postGoal>
+
     <!-- ========= -->
     <!-- Classpath -->
     <!-- ========= -->
@@ -218,6 +311,7 @@
         <pathelement location="${jdo.tck.testclasses.dir}"/>
         <!-- JDO jar file  -->
         <pathelement location="${jdo.jdoapi.jarfile}"/>
+        <pathelement location="${jta.jarfile}" />
         <!-- Jar files for the implementation to be tested -->
         <path refid="test_iut_jars" />
         <!-- JUnit jar file -->
@@ -229,7 +323,26 @@
         <pathelement location="${jdo.jdori.jarfile}" />
         <pathelement location="${jdo.jdobtree.jarfile}" />
         <pathelement location="${antlr.jarfile}" />
+        <pathelement location="${xmlparser}" />
+    </path>
+
+    <path id="jdori.class.path">
+        <!-- Directory where jdori enhanced class files are located  -->
+        <pathelement 
location="${jdo.enhanced.dir}/${jdo.tck.identitytype}.jar"/>
+        <!-- Directory where JDOTCK class files are located  -->
+        <pathelement location="${jdo.tck.testclasses.dir}"/>
+        <!-- JDO jar file  -->
+        <pathelement location="${jdo.jdoapi.jarfile}"/>
         <pathelement location="${jta.jarfile}" />
+        <!-- JUnit jar file -->
+        <pathelement location="${junit.jarfile}"/>
+        <!-- Spring jar files -->
+        <pathelement location="${spring.jarfile}"/>
+        <pathelement location="${logging.jarfile}"/>
+        <!-- Jar files for the reference implementation -->
+        <pathelement location="${jdo.jdori.jarfile}" />
+        <pathelement location="${jdo.jdobtree.jarfile}" />
+        <pathelement location="${antlr.jarfile}" />
         <pathelement location="${xmlparser}" />
     </path>
 

Modified: incubator/jdo/trunk/tck11/project.properties
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/project.properties?view=diff&r1=161610&r2=161611
==============================================================================
--- incubator/jdo/trunk/tck11/project.properties (original)
+++ incubator/jdo/trunk/tck11/project.properties Sat Apr 16 14:37:53 2005
@@ -26,6 +26,7 @@
 iut.enhancer.main = ${jdo.enhancer.main}
 iut.enhancer.options = -f -d "${iut.enhanced.dir}" -s 
"${iut.enhanced.dir}${path.separator}${jdo.enhancer.sourcepath}"
 iut.enhancer.args = ${jdo.tck.pcclasses.files} ${jdo.tck.paclasses.files}
+iut.enhancer.classpath = 
${jdo.jdori.jarfile}${path.separator}${jdo.jdoapi.jarfile}${path.separator}${logging.jarfile}
 iut.enhancer.sysproperties = 
 
 # JUnit settings
@@ -38,7 +39,7 @@
 
 # JDO TCK settings
 jdo.tck.configuration = ${basedir}/test/conf/datastoreidentity.conf
-jdo.tck.testclasses.dir = ${maven.build.dir}/test-classes
+jdo.tck.testclasses.dir = ${maven.build.dir}/classes
 jdo.tck.testdir = ${maven.build.dir}
 jdo.tck.resultprinterclass = org.apache.jdo.tck.util.BatchResultPrinter
 
@@ -54,10 +55,11 @@
 xmlparser =
 
 # JDORI enhancer
+jdo.enhanced.dir = ${maven.build.dir}/enhanced/jdori
 jdo.enhancer.main = org.apache.jdo.enhancer.Main
-jdo.enhancer.options = -f -d "${jdo.tck.testclasses.dir}" -s 
"${jdo.enhancer.sourcepath}"
+jdo.enhancer.options = -f -d "${jdo.enhanced.dir}" -s 
"${jdo.enhancer.sourcepath}"
 jdo.enhancer.args = ${jdo.tck.pcclasses.files} ${jdo.tck.paclasses.files}
-jdo.enhancer.sourcepath = 
${jdo.tck.testclasses.dir}${path.separator}${jdo.jdoapi.jarfile}${path.separator}${junit.jarfile}${path.separator}${logging.jarfile}
+jdo.enhancer.sourcepath = 
${jdo.tck.testclasses.dir}${path.separator}${basedir}/test/jdo/datastoreidentity${path.separator}${jdo.jdoapi.jarfile}${path.separator}${junit.jarfile}${path.separator}${logging.jarfile}
 jdo.enhancer.classpath = 
${jdo.jdori.jarfile}${path.separator}${jdo.jdoapi.jarfile}${path.separator}${logging.jarfile}
 
 jdo.tck.pcclasses.sources = \
@@ -253,3 +255,53 @@
     
org/apache/jdo/tck/api/instancecallbacks/ModificationOfNontransactionalNonpersistentFields.class
 \
     
org/apache/jdo/tck/api/instancecallbacks/NoAccessToFieldsAfterPredelete.class \
     org/apache/jdo/tck/api/instancecallbacks/TestParts.class
+
+jdo.tck.jdometadata.files = \
+    org/apache/jdo/tck/pc/company/package.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/AllTypes.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/ArrayCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/ArrayListCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/CollectionCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfBigDecimal.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfBigInteger.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfBoolean.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfByte.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfCharacter.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfDate.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfDouble.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfFloat.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfInteger.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfLocale.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfLong.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfObject.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfPrimitiveboolean.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfPrimitivebyte.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfPrimitivechar.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfPrimitivedouble.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfPrimitivefloat.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfPrimitiveint.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfPrimitivelong.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfPrimitiveshort.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfShort.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfSimpleClass.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfSimpleInterface.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/FieldsOfString.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/HashMapStringKeyCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/HashMapStringValueCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/HashSetCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/HashtableStringKeyCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/HashtableStringValueCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/LinkedListCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/ListCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/MapStringKeyCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/MapStringValueCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/SetCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/SimpleClass.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/TreeMapStringKeyCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/TreeMapStringValueCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/TreeSetCollections.jdo \
+    org/apache/jdo/tck/pc/fieldtypes/VectorCollections.jdo \
+    org/apache/jdo/tck/pc/inheritance/package.jdo \
+    org/apache/jdo/tck/pc/instancecallbacks/package.jdo \
+    org/apache/jdo/tck/pc/lifecycle/StateTransitionObj.jdo \
+    org/apache/jdo/tck/pc/mylib/package.jdo

Modified: incubator/jdo/trunk/tck11/project.xml
URL: 
http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/project.xml?view=diff&r1=161610&r2=161611
==============================================================================
--- incubator/jdo/trunk/tck11/project.xml (original)
+++ incubator/jdo/trunk/tck11/project.xml Sat Apr 16 14:37:53 2005
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 
 <!--
     Copyright 2005 The Apache Software Foundation
@@ -36,6 +36,11 @@
 The JDO TCK is a test suite designed to test implementations of the Java Data 
Objects 
 specification. In order to claim compatibility with JDO, an implementation 
must pass 
 all relevant tests of the JDOTCK.
+
+NOTE!! This project has a nonstandard structure. 
+The source files are located in the test directory. 
+However the build treats this directory as the source directory.  
+There are no unit tests in this project.
     </description>
     <repository/>
     <!-- ============ -->
@@ -91,47 +96,27 @@
     <!-- =================== -->
 
     <build>
-        <unitTestSourceDirectory>test/java</unitTestSourceDirectory>
-        <!-- Unit test cases -->
-        <unitTest>
-            <includes>
-                <include>**/*.java</include>
-            </includes>
-            <excludes>
-                <exclude>**/pc/**/*.java</exclude>
-                <exclude>**/util/*.java</exclude>
-                <exclude>**/JDO_Test*.java</exclude>
-                <exclude>**/TestParts.java</exclude>
-                <exclude>**/EnhancerTest.java</exclude>
-                <exclude>**/ExtentTest.java</exclude>
-                <exclude>**/QueryTest.java</exclude>
-                <exclude>**/PersistenceManagerTest.java</exclude>
-                <exclude>**/FirstSetOfTestValuesForCollection.java</exclude>
-                <exclude>**/SecondSetOfTestValuesForCollection.java</exclude>
-                <exclude>**/TestUtil.java</exclude>
-                <exclude>**/ComparisonTests.java</exclude>
-            </excludes>
-            <resources>
-                <resource>
-                    <directory>${basedir}/test/java</directory>
-                    <includes>
-                        <include>**/*.xml</include>
-                    </includes>
-                </resource>
-            </resources>
-            <resources>
-                <resource>
-                    <directory>${basedir}/test/conf</directory>
-                    <includes>
-                        <include>JDOTCKTestCases.list</include>
-                        <include>enhancement-test.properties</include>
-                        <include>commons-logging.properties</include>
-                        <include>simplelog.properties</include>
-                        <include>logging.properties</include>
-                    </includes>
-                </resource>
-            </resources>
-        </unitTest>
+        <sourceDirectory>test/java</sourceDirectory>
+        <resources>
+            <resource>
+                <directory>${basedir}/test/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                </includes>
+            </resource>
+        </resources>
+        <resources>
+            <resource>
+                <directory>${basedir}/test/conf</directory>
+                <includes>
+                    <include>JDOTCKTestCases.list</include>
+                    <include>enhancement-test.properties</include>
+                    <include>commons-logging.properties</include>
+                    <include>simplelog.properties</include>
+                    <include>logging.properties</include>
+                </includes>
+            </resource>
+        </resources>
               
     </build>
 </project>


Reply via email to