db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r593571 - in /db/derby/code/trunk: ./ build.xml java/testing/org/apache/derby/PackagePrivateTestSuite.java java/testing/org/apache/derby/build.xml tools/ant/properties/dirs.properties
Date Fri, 09 Nov 2007 15:39:53 GMT
Author: kristwaa
Date: Fri Nov  9 07:39:53 2007
New Revision: 593571

URL: http://svn.apache.org/viewvc?rev=593571&view=rev
Log:
DERBY-3149: Add ant targets for building and running the package private tests against the
classes directories. Added two targets; 'pptesting' and 'junit-pptesting'. Package-private
tests are currently only run against the classes-directory, and the have to be run manually.
They are not part of any other target/suite yet.
Patch file: derby-3149-1b.diff

Added:
    db/derby/code/trunk/java/testing/org/apache/derby/PackagePrivateTestSuite.java   (with
props)
    db/derby/code/trunk/java/testing/org/apache/derby/build.xml   (with props)
Modified:
    db/derby/code/trunk/   (props changed)
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/tools/ant/properties/dirs.properties

Propchange: db/derby/code/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Nov  9 07:39:53 2007
@@ -1,4 +1,5 @@
 classes
+classes.pptesting
 classes.storeless
 changenumber.properties
 jars

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=593571&r1=593570&r2=593571&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Fri Nov  9 07:39:53 2007
@@ -38,7 +38,7 @@
 <!-- Targets -->
 
   <target name="buildsource" depends="checkCompilerLevel,init,engine,storeless,tools,drda,client,build,versioninfo,localeinfo"/>
-  <target name="all" depends="buildsource,demo,testing"/>
+  <target name="all" depends="buildsource,demo,testing,pptesting"/>
 
 <!-- ==================================================================== -->
 <!--                       Initialize targets                             -->
@@ -392,10 +392,14 @@
     <ant dir="${derby.demo.src.dir}" target="compile-vtidemo"/>
   </target>
 
-  <target name="testing" depends="demo">
+  <target name="testing" depends="buildsource,demo">
     <ant dir="${derby.testing.src.dir}"/>
   </target>
 	
+  <!-- Build the package private tests -->
+  <target name="pptesting" if="jdk16" depends="testing">
+    <ant dir="${derby.pptesting.src.dir}"/>
+  </target>
 
 
 <!-- ==================================================================== -->
@@ -453,6 +457,7 @@
   <target name="clean">
     <delete dir="${out.dir}"/>
   	<delete dir="${out.storeless.dir}"/>
+  	<delete dir="${out.pptesting.dir}"/>
   </target>
 
 <!-- ==================================================================== -->
@@ -1839,6 +1844,26 @@
        	    <pathelement path="${derby.junit.classpath}"/>
         </classpath>
       </junit>	
+  </target>
+
+  <!-- Run the package private tests against the classes directories. -->
+  <target name="junit-pptesting" depends="junit-init">
+    <junit  printsummary="on"
+            fork="yes" forkmode="once"
+            showoutput="yes"
+            dir="junit_${derby.junit.timestamp}"
+            errorproperty="tests.failed"
+            failureproperty="tests.failed">
+        <formatter type="xml"/>
+
+        <test name="org.apache.derby.PackagePrivateTestSuite"
+                todir="junit_${derby.junit.timestamp}"/>
+
+        <classpath>
+            <pathelement location="${out.pptesting.dir}"/>
+            <pathelement location="${out.dir}"/>
+        </classpath>
+    </junit>
   </target>
 
   <target name="junit-all" depends="junit-core,junit-jdbc4">

Added: db/derby/code/trunk/java/testing/org/apache/derby/PackagePrivateTestSuite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derby/PackagePrivateTestSuite.java?rev=593571&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derby/PackagePrivateTestSuite.java (added)
+++ db/derby/code/trunk/java/testing/org/apache/derby/PackagePrivateTestSuite.java Fri Nov
 9 07:39:53 2007
@@ -0,0 +1,47 @@
+/*
+
+   Derby - Class org.apache.derby.PackagePrivateTestSuite
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to you under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+package org.apache.derby;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.derbyTesting.junit.BaseTestCase;
+
+public class PackagePrivateTestSuite
+    extends BaseTestCase {
+
+    /**
+     * Use the {@link suite}  method instead.
+     */
+    private PackagePrivateTestSuite(String name) {
+        super(name);
+    }
+
+    public static Test suite() throws Exception {
+
+        TestSuite suite = new TestSuite("Package-private tests");
+
+        suite.addTest(org.apache.derby.impl.jdbc._Suite.suite());
+
+        return suite;
+    }
+
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derby/PackagePrivateTestSuite.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derby/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derby/build.xml?rev=593571&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derby/build.xml (added)
+++ db/derby/code/trunk/java/testing/org/apache/derby/build.xml Fri Nov  9 07:39:53 2007
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to you under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project default="pptesting-build" basedir="../../../../../">
+
+    <!-- Compile-time classpath properties files -->
+    <property file="${properties.dir}/extrapath.properties"/>
+    <property file="${properties.dir}/compilepath.properties"/>
+
+    <target name="compile">
+        <mkdir dir="${out.pptesting.dir}"/>
+
+        <javac
+            source="1.5"
+            target="1.5"
+            fork="yes"
+            bootclasspath="${empty}"
+            nowarn="on"
+            debug="${debug}"
+            depend="${depend}"
+            deprecation="${deprecation}"
+            optimize="${optimize}"
+            proceed="${proceed}"
+            verbose="${verbose}"
+            srcdir="${derby.pptesting.src.dir}"
+            destdir="${out.pptesting.dir}">
+            <classpath>
+                <!-- Fix this to use the Java SE 5 classpath -->
+                <pathelement path="${java16compile.classpath}"/>
+                <pathelement path="${junit}"/>
+                <pathelement path="${out.dir}"/>
+            </classpath>
+            <include name="**/*Test.java"/>
+            <include name="**/_Suite.java"/>
+            <include name="**/PackagePrivateTestSuite.java"/>
+        </javac>
+    </target>
+
+    <target name="pptesting-build" depends="compile">
+       <echo message="Package private tests build completed."/>
+    </target>
+</project>

Propchange: db/derby/code/trunk/java/testing/org/apache/derby/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/tools/ant/properties/dirs.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/ant/properties/dirs.properties?rev=593571&r1=593570&r2=593571&view=diff
==============================================================================
--- db/derby/code/trunk/tools/ant/properties/dirs.properties (original)
+++ db/derby/code/trunk/tools/ant/properties/dirs.properties Fri Nov  9 07:39:53 2007
@@ -33,6 +33,7 @@
 class.dir=classes
 out.dir=${basedir}/${class.dir}
 out.storeless.dir=${basedir}/${class.dir}.storeless
+out.pptesting.dir=${basedir}/${class.dir}.pptesting
 outcom.dir=${out.dir}/${com.dir}
 out.javadoc.dir=${basedir}/javadoc
 out.testdir=${basedir}/testout_${jdk}
@@ -56,6 +57,7 @@
 derby.build.src.dir=${derbysrc.dir}/build
 derby.demo.src.dir=${derbysrc.dir}/demo
 derby.testing.src.dir=${derbysrc.dir}/testing
+derby.pptesting.src.dir=${derby.testing.src.dir}/org/apache/derby
 derby.storeless.src.dir=${derbysrc.dir}/storeless
 derby.metadata.src.dir=${derby.engine.src.dir}/org/apache/derby/impl/jdbc
 



Mime
View raw message