incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1232405 - in /incubator/lcf/trunk/connectors: alfresco/build.xml cmis/build.xml connector-build.xml filesystem/build.xml rss/build.xml webcrawler/build.xml wiki/build.xml
Date Tue, 17 Jan 2012 13:04:58 GMT
Author: kwright
Date: Tue Jan 17 13:04:57 2012
New Revision: 1232405

URL: http://svn.apache.org/viewvc?rev=1232405&view=rev
Log:
Factor out common connector test invocations.  Part of CONNECTORS-384.

Modified:
    incubator/lcf/trunk/connectors/alfresco/build.xml
    incubator/lcf/trunk/connectors/cmis/build.xml
    incubator/lcf/trunk/connectors/connector-build.xml
    incubator/lcf/trunk/connectors/filesystem/build.xml
    incubator/lcf/trunk/connectors/rss/build.xml
    incubator/lcf/trunk/connectors/webcrawler/build.xml
    incubator/lcf/trunk/connectors/wiki/build.xml

Modified: incubator/lcf/trunk/connectors/alfresco/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/alfresco/build.xml?rev=1232405&r1=1232404&r2=1232405&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/alfresco/build.xml (original)
+++ incubator/lcf/trunk/connectors/alfresco/build.xml Tue Jan 17 13:04:57 2012
@@ -39,7 +39,7 @@
     </target>
 
     <target name="pretest-check" depends="calculate-testcode-condition" unless="canTest">
-        <echo message="Alfresco Connector tests cannot be be performed without alfresco.war"/>
+        <echo message="Alfresco Connector integration tests cannot be be performed without
alfresco.war"/>
     </target>
 
     <path id="connector-classpath">
@@ -96,20 +96,6 @@
         </copy>
     </target>
 
-    <target name="run-tests-derby" depends="compile-tests,precompile-check" if="canBuild">
-        <mkdir dir="test-derby-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-derby-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <formatter type="brief" usefile="false"/>
-
-            <test name="org.apache.manifoldcf.crawler.connectors.alfresco.tests.SanityDerbyTest"
todir="test-derby-output"/>
-            <!-- MHL -->
-        </junit>
-    </target>
-    
     <target name="download-alfresco-ws-client">
       <get src="http://maven.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-web-service-client/3.4.e/alfresco-web-service-client-3.4.e.jar"
dest="alfresco-ws-client"/>
     </target>

Modified: incubator/lcf/trunk/connectors/cmis/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/build.xml?rev=1232405&r1=1232404&r2=1232405&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/build.xml (original)
+++ incubator/lcf/trunk/connectors/cmis/build.xml Tue Jan 17 13:04:57 2012
@@ -60,18 +60,4 @@
         </copy>
     </target>
 
-    <target name="run-tests-derby" depends="build-tests">
-        <mkdir dir="test-derby-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-derby-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <formatter type="brief" usefile="false"/>
-
-            <test name="org.apache.manifoldcf.crawler.connectors.cmis.tests.SanityDerbyTest"
todir="test-derby-output"/>
-            <!-- MHL -->
-        </junit>
-    </target>
-    
 </project>

Modified: incubator/lcf/trunk/connectors/connector-build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/connector-build.xml?rev=1232405&r1=1232404&r2=1232405&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/connector-build.xml (original)
+++ incubator/lcf/trunk/connectors/connector-build.xml Tue Jan 17 13:04:57 2012
@@ -117,13 +117,21 @@
     </target>
 
     <target name="calculate-testcode-condition" depends="calculate-condition" if="canBuild">
-        <available file="build.xml" property="canTest"/>
+        <available file="connector/src/test/java" property="canTest"/>
     </target>
 
     <target name="precompile-check" depends="calculate-condition" unless="canBuild"/>
 
     <target name="pretest-check" depends="calculate-testcode-condition" unless="canTest"/>
 
+    <target name="has-tests-check" depends="precompile-check" if="canBuild">
+        <available file="connector/src/test/java" property="hasTests"/>
+    </target>
+
+    <target name="has-test-resources-check" depends="has-tests-check" if="hasTests">
+        <available file="connector/src/test/resources" property="hasTestResources"/>
+    </target>
+
     <target name="has-native2ascii-check" depends="precompile-check" if="canBuild">
         <available file="connector/src/main/native2ascii" property="hasNative2Ascii"/>
     </target>
@@ -147,14 +155,6 @@
         </condition>
     </target>
     
-    <target name="has-tests-check" depends="precompile-check" if="canBuild">
-        <available file="connector/src/test" property="hasTests"/>
-    </target>
-
-    <target name="has-test-resources-check" depends="has-tests-check" if="hasTests">
-        <available file="connector/src/test/resources" property="hasTestResources"/>
-    </target>
-
     <target name="classcreate-wsdl">
         <mkdir dir="build/wsdljava"/>
         <java classname="org.apache.axis.wsdl.WSDL2Java" fork="true">
@@ -493,13 +493,103 @@
 
     <target name="build-test-materials"/>
 
-    <target name="run-tests"/>
-    <target name="run-tests-derby"/>
-    <target name="run-tests-postgresql"/>
-    <target name="run-tests-mysql"/>
-    <target name="run-tests-HSQLDB"/>
-    <target name="run-tests-HSQLDBext"/>
+    <target name="run-tests" depends="compile-tests,has-tests-check" if="hasTests">
+        <mkdir dir="test-output"/>
+        <junit fork="true" maxmemory="128m" dir="test-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
+            <classpath>
+                <path refid="connector-test-classpath"/>
+                <pathelement location="build/connector-tests/classes"/>
+            </classpath>
+            <formatter type="brief" usefile="false"/>
+            <batchtest todir="test-output">
+                <fileset dir="build/connector-tests/classes">
+                    <include name="**/*Test.class"/>
+                    <exclude name="**/*DerbyTest.class"/>
+                    <exclude name="**/*PostgresqlTest.class"/>
+                    <exclude name="**/*MySQLTest.class"/>
+                    <exclude name="**/*HSQLDBTest.class"/>
+                    <exclude name="**/*HSQLDBextTest.class"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="run-tests-derby" depends="compile-tests,has-tests-check" if="hasTests">
+        <mkdir dir="test-derby-output"/>
+        <junit fork="true" maxmemory="128m" dir="test-derby-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
+            <classpath>
+                <path refid="connector-test-classpath"/>
+                <pathelement location="build/connector-tests/classes"/>
+            </classpath>
+            <formatter type="brief" usefile="false"/>
+            <batchtest todir="test-derby-output">
+                <fileset dir="build/connector-tests/classes">
+                    <include name="**/*DerbyTest.class"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
     
+    <target name="run-tests-postgresql" depends="compile-tests,has-tests-check" if="hasTests">
+        <mkdir dir="test-postgresql-output"/>
+        <junit fork="true" maxmemory="128m" dir="test-postgresql-output" showoutput="true"
haltonfailure="true">
+            <classpath>
+                <path refid="connector-test-classpath"/>
+                <pathelement location="build/connector-tests/classes"/>
+            </classpath>
+            <batchtest todir="test-postgresql-output">
+                <fileset dir="build/connector-tests/classes">
+                    <include name="**/*PostgresqlTest.class"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="run-tests-mysql" depends="compile-tests,has-tests-check" if="hasTests">
+        <mkdir dir="test-mysql-output"/>
+        <junit fork="true" maxmemory="128m" dir="test-mysql-output" showoutput="true"
haltonfailure="true">
+            <classpath>
+                <path refid="connector-test-classpath"/>
+                <pathelement location="build/connector-tests/classes"/>
+            </classpath>
+            <batchtest todir="test-mysql-output">
+                <fileset dir="build/connector-tests/classes">
+                    <include name="**/*MySQLTest.class"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="run-tests-HSQLDB" depends="compile-tests,has-tests-check" if="hasTests">
+        <mkdir dir="test-HSQLDB-output"/>
+        <junit fork="true" maxmemory="128m" dir="test-HSQLDB-output" showoutput="true"
haltonfailure="true">
+            <classpath>
+                <path refid="connector-test-classpath"/>
+                <pathelement location="build/connector-tests/classes"/>
+            </classpath>
+            <batchtest todir="test-HSQLDB-output">
+                <fileset dir="build/connector-tests/classes">
+                    <include name="**/*HSQLDBTest.class"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="run-tests-HSQLDBext" depends="compile-tests,has-tests-check" if="hasTests">
+        <mkdir dir="test-HSQLDBext-output"/>
+        <junit fork="true" maxmemory="128m" dir="test-HSQLDBext-output" showoutput="true"
haltonfailure="true">
+            <classpath>
+                <path refid="connector-test-classpath"/>
+                <pathelement location="build/connector-tests/classes"/>
+            </classpath>
+            <batchtest todir="test-HSQLDBext-output">
+                <fileset dir="build/connector-tests/classes">
+                    <include name="**/*HSQLDBextTest.class"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
+
     <target name="download-dependencies"/>
 
     <target name="all" depends="build,doc,build-tests,run-tests,run-tests-derby,run-tests-HSQLDB"/>

Modified: incubator/lcf/trunk/connectors/filesystem/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/filesystem/build.xml?rev=1232405&r1=1232404&r2=1232405&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/filesystem/build.xml (original)
+++ incubator/lcf/trunk/connectors/filesystem/build.xml Tue Jan 17 13:04:57 2012
@@ -19,55 +19,4 @@
 
     <import file="../connector-build.xml"/>
 
-    <target name="run-tests-derby" depends="compile-tests">
-        <mkdir dir="test-derby-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-derby-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <formatter type="brief" usefile="false"/>
-
-            <test name="org.apache.manifoldcf.crawler.connectors.filesystem.tests.SanityDerbyTest"
todir="test-derby-output"/>
-            <!-- MHL -->
-        </junit>
-    </target>
-    
-    <target name="run-tests-postgresql" depends="compile-tests">
-        <mkdir dir="test-postgresql-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-postgresql-output" showoutput="true"
haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <test name="org.apache.manifoldcf.crawler.connectors.filesystem.tests.SanityPostgresqlTest"
todir="test-postgresql-output"/>
-            <!-- MHL -->
-        </junit>
-    </target>
-
-    <target name="run-tests-mysql" depends="compile-tests">
-        <mkdir dir="test-mysql-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-mysql-output" showoutput="true"
haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <test name="org.apache.manifoldcf.crawler.connectors.filesystem.tests.SanityMySQLTest"
todir="test-mysql-output"/>
-            <!-- MHL -->
-        </junit>
-    </target>
-
-    <target name="run-tests-HSQLDB" depends="compile-tests">
-        <mkdir dir="test-HSQLDB-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-HSQLDB-output" showoutput="true"
haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <test name="org.apache.manifoldcf.crawler.connectors.filesystem.tests.SanityHSQLDBTest"
todir="test-HSQLDB-output"/>
-            <!-- MHL -->
-        </junit>
-    </target>
-
-    
 </project>

Modified: incubator/lcf/trunk/connectors/rss/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/rss/build.xml?rev=1232405&r1=1232404&r2=1232405&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/rss/build.xml (original)
+++ incubator/lcf/trunk/connectors/rss/build.xml Tue Jan 17 13:04:57 2012
@@ -19,18 +19,4 @@
 
     <import file="../connector-build.xml"/>
 
-    <target name="run-tests" depends="compile-tests">
-        <mkdir dir="test-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <formatter type="brief" usefile="false"/>
-
-            <test name="org.apache.manifoldcf.crawler.connectors.rss.tests.URLTest" todir="test-output"/>
-            <!-- MHL -->
-        </junit>
-    </target>
-
 </project>

Modified: incubator/lcf/trunk/connectors/webcrawler/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/webcrawler/build.xml?rev=1232405&r1=1232404&r2=1232405&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/webcrawler/build.xml (original)
+++ incubator/lcf/trunk/connectors/webcrawler/build.xml Tue Jan 17 13:04:57 2012
@@ -19,18 +19,4 @@
 
     <import file="../connector-build.xml"/>
 
-    <target name="run-tests" depends="compile-tests">
-        <mkdir dir="test-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <formatter type="brief" usefile="false"/>
-
-            <test name="org.apache.manifoldcf.crawler.connectors.webcrawler.tests.URLTest"
todir="test-output"/>
-            <!-- MHL -->
-        </junit>
-    </target>
-
 </project>

Modified: incubator/lcf/trunk/connectors/wiki/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/wiki/build.xml?rev=1232405&r1=1232404&r2=1232405&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/wiki/build.xml (original)
+++ incubator/lcf/trunk/connectors/wiki/build.xml Tue Jan 17 13:04:57 2012
@@ -19,61 +19,4 @@
 
     <import file="../connector-build.xml"/>
 
-    <target name="run-tests-derby" depends="compile-tests">
-        <mkdir dir="test-derby-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-derby-output" outputtoformatters="true"
showoutput="true" haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            <formatter type="brief" usefile="false"/>
-
-            <test name="org.apache.manifoldcf.crawler.connectors.wiki.tests.SanityDerbyTest"
todir="test-derby-output"/>
-            <!-- MHL -->
-            
-        </junit>
-    </target>
-    
-    <target name="run-tests-postgresql" depends="compile-tests">
-        <mkdir dir="test-postgresql-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-postgresql-output" showoutput="true"
haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            
-            <test name="org.apache.manifoldcf.crawler.connectors.wiki.tests.SanityPostgresqlTest"
todir="test-postgresql-output"/>
-            <!-- MHL -->
-            
-        </junit>
-    </target>
-
-    <target name="run-tests-mysql" depends="compile-tests">
-        <mkdir dir="test-mysql-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-mysql-output" showoutput="true"
haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            
-            <test name="org.apache.manifoldcf.crawler.connectors.wiki.tests.SanityMySQLTest"
todir="test-mysql-output"/>
-            <!-- MHL -->
-            
-        </junit>
-    </target>
-
-    <target name="run-tests-HSQLDB" depends="compile-tests">
-        <mkdir dir="test-HSQLDB-output"/>
-        <junit fork="true" maxmemory="128m" dir="test-HSQLDB-output" showoutput="true"
haltonfailure="true">
-            <classpath>
-                <path refid="connector-test-classpath"/>
-                <pathelement location="build/connector-tests/classes"/>
-            </classpath>
-            
-            <test name="org.apache.manifoldcf.crawler.connectors.wiki.tests.SanityHSQLDBTest"
todir="test-HSQLDB-output"/>
-            <!-- MHL -->
-            
-        </junit>
-    </target>
-    
 </project>



Mime
View raw message