Add a more thorough set of unit tests for using JDK 1.4 logging. Right now,
the tests run when everything is in the system class loader -- need to add
execution wrappers for two-tier class loaders where:
* commons-logging.jar is in the parent and test execution is in the child
* commons-logging-api.jar is in the parent and test execution plus
commons-logging.jar is in the child
to simulate container environments like that you get running inside Tomcat.
Later on, we'll want an analogous set of tests for Log4J.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
61
build.xml
61
build.xml
@@ -3,7 +3,7 @@
|
||||
|
||||
<!--
|
||||
"Logging" component of the Jakarta Commons Subproject
|
||||
$Id: build.xml,v 1.25 2003/03/17 03:24:14 craigmcc Exp $
|
||||
$Id: build.xml,v 1.26 2003/03/29 22:04:54 craigmcc Exp $
|
||||
-->
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<!-- ========== Test Execution Defaults =================================== -->
|
||||
|
||||
|
||||
<!-- Construct unit test classpath -->
|
||||
<!-- Construct unit test classpath (generic tests) -->
|
||||
<path id="test.classpath">
|
||||
<pathelement location="${build.home}/classes"/>
|
||||
<pathelement location="${build.home}/tests"/>
|
||||
@@ -96,6 +96,13 @@
|
||||
<pathelement location="${conf.home}"/>
|
||||
</path>
|
||||
|
||||
<!-- Construct unit test classpath (JDK 1.4 tests) -->
|
||||
<path id="test.classpath.jdk14">
|
||||
<pathelement location="${build.home}/classes"/>
|
||||
<pathelement location="${build.home}/tests"/>
|
||||
<pathelement location="${junit.jar}"/>
|
||||
</path>
|
||||
|
||||
<!-- Should all tests fail if one does? -->
|
||||
<property name="test.failonerror" value="true"/>
|
||||
|
||||
@@ -273,4 +280,54 @@
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="test.jdk14" depends="compile.tests" if="jdk.1.4.present"
|
||||
description="Run unit tests specific to JDK 1.4 logging">
|
||||
|
||||
<echo message="Default Configuration (JDK 1.4 Auto-Recognized)"/>
|
||||
<java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
|
||||
<arg value="org.apache.commons.logging.jdk14.DefaultConfigTestCase"/>
|
||||
<classpath refid="test.classpath.jdk14"/>
|
||||
</java>
|
||||
|
||||
<echo message="Default Configuration (JDK 1.4 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.jdk14.DefaultConfigTestCase"/>
|
||||
<classpath refid="test.classpath.jdk14"/>
|
||||
</java>
|
||||
|
||||
<echo message="Default Configuration (JDK 1.4 Jdk14Logger Selected)"/>
|
||||
<java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
|
||||
<sysproperty key="org.apache.commons.logging.Log"
|
||||
value="org.apache.commons.logging.impl.Jdk14Logger"/>
|
||||
<arg value="org.apache.commons.logging.jdk14.DefaultConfigTestCase"/>
|
||||
<classpath refid="test.classpath.jdk14"/>
|
||||
</java>
|
||||
|
||||
<echo message="Custom Configuration (JDK 1.4 Auto-Recognized)"/>
|
||||
<java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
|
||||
<arg value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/>
|
||||
<classpath refid="test.classpath.jdk14"/>
|
||||
</java>
|
||||
|
||||
<echo message="Custom Configuration (JDK 1.4 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.jdk14.CustomConfigTestCase"/>
|
||||
<classpath refid="test.classpath.jdk14"/>
|
||||
</java>
|
||||
|
||||
<echo message="Custom Configuration (JDK 1.4 Jdk14Logger Selected)"/>
|
||||
<java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
|
||||
<sysproperty key="org.apache.commons.logging.Log"
|
||||
value="org.apache.commons.logging.impl.Jdk14Logger"/>
|
||||
<arg value="org.apache.commons.logging.jdk14.CustomConfigTestCase"/>
|
||||
<classpath refid="test.classpath.jdk14"/>
|
||||
</java>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user