You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2005/07/08 13:46:42 UTC

svn commit: r209738 - /jakarta/commons/proper/logging/trunk/build.xml

Author: skitching
Date: Fri Jul  8 04:46:41 2005
New Revision: 209738

URL: http://svn.apache.org/viewcvs?rev=209738&view=rev
Log:
log4j tests now all work fine with <batchtest> so remove special case code for log4j.

Modified:
    jakarta/commons/proper/logging/trunk/build.xml

Modified: jakarta/commons/proper/logging/trunk/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/build.xml?rev=209738&r1=209737&r2=209738&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/build.xml (original)
+++ jakarta/commons/proper/logging/trunk/build.xml Fri Jul  8 04:46:41 2005
@@ -140,7 +140,14 @@
 <!-- ========== Test Execution Defaults =================================== -->
 
 
-  <!-- Construct unit test classpath (generic tests) -->
+  <!-- 
+    - Construct unit test classpath (generic tests).
+    -
+    - Note that unit tests that use the PathableTestSuite approach don't need
+    - any of this (except junit). However unit tests that don't use PathableTestSuite
+    - to configure their classpath will need the basic classes to be provided
+    - via this mechanism.
+    -->
   <path id="test.classpath">
     <pathelement location="${build.home}/classes"/>
     <pathelement location="${build.home}/tests"/>
@@ -593,12 +600,8 @@
 <!-- ========== Unit Test Targets ========================================= -->
 
 
-  <target name="test"
-       depends="log4j12-test-warning, compile.tests, testall, test.log4j"/>
-
-
   <!--
-    - Target to run all unit tests (except log4j tests for now).
+    - Target to run all unit tests.
     -
     - The batchtest task auto-detects what tests are available without
     - any need to define TestSuite objects in the code to compose
@@ -615,7 +618,7 @@
     -   ant -Dtestmatch=**/FooTestCase testall
     -->
 
-  <target name="testall" depends="compile.tests"
+  <target name="test" depends="log4j12-test-warning, compile.tests"
    description="Run all unit tests">
     <echo message="Test output can be found in directory ${build.home}/test-reports."/>
     <delete dir="${build.home}/test-reports"/>
@@ -655,15 +658,6 @@
       <batchtest todir="${build.home}/test-reports">
         <fileset dir="${build.home}/tests">
           <include name="${testmatch}.class"/>
-
-	  <!--
-	    - Because we have two possible log4j jar files we
-	    - can't include them in the system classpath, and
-	    - so can't run the log4j tests here until after
-	    - those TestCase classes have been converted over
-	    - to using the PathableTestSuite approach.
-	    -->
-          <exclude name="**/log4j/*"/>
         </fileset>
       </batchtest>
     </junit>
@@ -671,125 +665,6 @@
     <fail if="test.failure">
       One or more unit tests failed.
     </fail>
-  </target>
-
-  <target name="test.log4j" depends="compile.tests" if="log4j12.present"
-   description="Run unit tests specific to Log4J logging">
-
-    <echo message="Default Configuration (Log4J Auto-Recognized)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <arg value="org.apache.commons.logging.log4j.DefaultConfigTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-
-    <echo message="Default Configuration (Log4J LogFactoryImpl Selected)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <sysproperty key="org.apache.commons.logging.LogFactory"
-                 value="org.apache.commons.logging.impl.LogFactoryImpl"/>
-      <arg value="org.apache.commons.logging.log4j.DefaultConfigTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-
-    <echo message="Default Configuration (Log4J Log4J12Logger Selected)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <sysproperty key="org.apache.commons.logging.Log"
-                 value="org.apache.commons.logging.impl.Log4J12Logger"/>
-      <arg value="org.apache.commons.logging.log4j.DefaultConfigTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-
-    <echo message="Custom Configuration (Log4J Auto-Recognized)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <arg value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-
-    <echo message="Custom Configuration (Log4J LogFactoryImpl Selected)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <sysproperty key="org.apache.commons.logging.LogFactory"
-                 value="org.apache.commons.logging.impl.LogFactoryImpl"/>
-      <arg value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-
-    <echo message="Custom Configuration (Log4J Log4J12Logger Selected)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <sysproperty key="org.apache.commons.logging.Log"
-                 value="org.apache.commons.logging.impl.Log4J12Logger"/>
-      <arg value="org.apache.commons.logging.log4j.CustomConfigTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-    
-    <echo message="Basic Operations"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <sysproperty key="org.apache.commons.logging.Log"
-                 value="org.apache.commons.logging.impl.Log4J12Logger"/>
-      <arg value="org.apache.commons.logging.BasicOperationsTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-
-    <echo message="Hierarchy Configuration API (Log4J Auto-Recognized)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <arg value="org.apache.commons.logging.log4j.CustomConfigAPITestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-
-    <echo message="Hierarchy Configuration API (Log4J LogFactoryImpl Selected)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <arg value="org.apache.commons.logging.log4j.CustomConfigAPITestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-
-
-      <sysproperty key="org.apache.commons.logging.LogFactory"
-                 value="org.apache.commons.logging.impl.LogFactoryImpl"/>
-    </java>
-
-    <echo message="Hierarchy Configuration API (Log4J Log4J12Logger Selected)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <arg value="org.apache.commons.logging.log4j.CustomConfigAPITestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-
-      <sysproperty key="org.apache.commons.logging.Log"
-                 value="org.apache.commons.logging.impl.Log4J12Logger"/>
-    </java>
-
-    <echo message="Hierarchy Configuration FULL (Log4J Auto-Recognized)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <arg value="org.apache.commons.logging.log4j.CustomConfigFullTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-    </java>
-
-    <echo message="Hierarchy Configuration FULL (Log4J LogFactoryImpl Selected)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <arg value="org.apache.commons.logging.log4j.CustomConfigFullTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-
-      <sysproperty key="org.apache.commons.logging.LogFactory"
-                 value="org.apache.commons.logging.impl.LogFactoryImpl"/>
-    </java>
-
-    <echo message="Hierarchy Configuration FULL (Log4J Log4J12Logger Selected)"/>
-    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-      <arg value="org.apache.commons.logging.log4j.CustomConfigFullTestCase"/>
-      <classpath refid="test.classpath.log4j12"/>
-      <syspropertyset refid="test-lib-props"/>
-
-      <sysproperty key="org.apache.commons.logging.Log"
-                 value="org.apache.commons.logging.impl.Log4J12Logger"/>
-    </java>
-
   </target>
 
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org