The version of Apache log4j used by SoundHelix.
Clone
HTTPS:
git clone https://vervis.peers.community/repos/aEp6o
SSH:
git clone USERNAME@vervis.peers.community:aEp6o
Branches
Tags
- 1.3alpha-7
- CHAINSAW_2_SANDBOX_MERGE
- CORE_VERSION
- LEVEL_REPLACES_PRIORITY
- PREALPHA_1_3_AS_OF_2004_05_12
- PRE_CHAINSAW_MODEL_CONVERSION
- PRE_UGLI_MOVE
- TAG_CHAINSAW2_MOVE
- log4j-1.2.17
- log4j-1.2.17-rc1
- v1.3alpha8
- v1.3alpha8-temp
- v1_2_1
- v1_2_10-recalled
- v1_2_11
- v1_2_11_rc1
- v1_2_11rc3
- v1_2_12
- v1_2_12_rc1
- v1_2_12_rc2
- v1_2_12_rc3
- v1_2_12_rc4
- v1_2_12_rc5
- v1_2_12_rc6
- v1_2_13
- v1_2_13_rc1
- v1_2_13_rc2
- v1_2_13_site_update
- v1_2_14
- v1_2_14_maven
- v1_2_14_rc1
- v1_2_14_site_update
- v1_2_15
- v1_2_15_rc1
- v1_2_15_rc2
- v1_2_15_rc3
- v1_2_15_rc4
- v1_2_15_rc5
- v1_2_15_rc6
- v1_2_16
- v1_2_16_rc1
- v1_2_16_rc2
- v1_2_17
- v1_2_17-rc1
- v1_2_17_rc1
- v1_2_17_rc2
- v1_2_17_rc3
- v1_2_2
- v1_2_3
- v1_2_4
- v1_2_6
- v1_2_7
- v1_2_9
- v1_2_alpha0
- v1_2_alpha7
- v1_2beta1
- v1_2final
- v1_3alpha_1
- v1_3alpha_6
- v_1_0
- v_1_0_1
- v_1_0_4
- v_1_1
- v_1_1_1
- v_1_1_2
- v_1_1_3
- v_1_1_b1
- v_1_1b2
- v_1_1b3
- v_1_1b5
- v_1_1b6
- v_1_1b7
- v_1_2beta3
v1_3alpha_1
:: tests
/
build.xml
<!-- This file is an ANT build script. ANT is a Java based build tool. -->
<!-- It is availale from http://jakarta.apache.org/ant/ -->
<!-- ================================================================= -->
<!-- NOTE: all directories are relative to jakarta-log4j/tests -->
<!-- ================================================================= -->
<project name="log4j-tests" default="usage" basedir="." >
<property file="build.properties"/>
<!-- The base directory relative to which most targets are built -->
<property name="base" value="."/>
<!-- The directory where source files are stored. -->
<property name="project.source.home" value="../src/java/"/>
<property name="project.classes.home" value="../dist/classes/"/>
<property name="examples.classes" value="../examples/classes/"/>
<property name="tests.source.home" value="./src/java/"/>
<!-- The stem where most log4j source code is located. -->
<property name="stem" value="org/apache/log4j"/>
<path id="tests.classpath">
<pathelement location="${project.source.home}"/>
<pathelement location="${project.classes.home}"/>
<pathelement location="${examples.classes}"/>
<pathelement location="${tests.source.home}"/>
<pathelement location="./classes"/>
<pathelement location="./resources"/>
<pathelement location="${jakarta.oro.jar}"/>
<fileset dir="./lib/">
<include name="*.jar"/>
</fileset>
</path>
<!-- ================================================================= -->
<!-- TARGETS -->
<!-- ================================================================= -->
<!-- ================================================================= -->
<!-- Default target -->
<!-- ================================================================= -->
<target name="usage">
<echo>
These are the targets supported by this ANT build scpript:
build - compile all project files, if a certain library is missing,
then the compilation of its dependents are skipped.
regression - Run regression tests which check large parts of log4j.
runAll - run all available tests
</echo>
</target>
<target name="prepare">
<mkdir dir="./classes" />
<mkdir dir="./output" />
<delete file="classes/log4j.xml"/>
<delete file="classes/log4j.properties"/>
</target>
<!-- ================================================================= -->
<!-- Build the parent project -->
<!-- ================================================================= -->
<target name="parentBuild">
<ant dir=".." target="build" inheritRefs="true"/>
</target>
<!-- ================================================================= -->
<!-- Compile test cases and related source files. -->
<!-- ================================================================= -->
<target name="build" depends="parentBuild, prepare">
<javac srcdir="${tests.source.home}"
destdir="./classes" excludes="${stem}/chainsaw/receivers/*.java"
deprecation="${deprecation}"
debug="on">
<classpath refid="tests.classpath"/>
</javac>
</target>
<!-- ================================================================= -->
<!-- Remove all generated files such as compiled class files and test -->
<!-- case output. -->
<!-- ================================================================= -->
<target name="clean">
<delete dir="./classes/" />
<delete dir="./output/" />
</target>
<target name="cleanOutputDir">
<delete>
<fileset dir="./output/" includes="**"/>
</delete>
</target>
<!-- ================================================================= -->
<!-- Run all tests -->
<!-- ================================================================= -->
<target name="runAll" depends="regression, longUnit"/>
<!-- ================================================================= -->
<!-- Tests multiple parts of log4j. These tests are much more fragile -->
<!-- unit tests. Regression tests compare output with a previously -->
<!-- created witness file. -->
<!-- ================================================================= -->
<target name="regression" depends="Minimum, Logger, DOM, CustomLevel,
CustomLogger, PatternLayout,
HierarchyThreshold, DefaultInit,
SocketServer,
XMLLayout, AsyncAppender, ErrorHandler,
OptionSubstitutionTest,
LevelOptionConverterTest,
BoundedFIFO,
Joran,
Scheduler,
ThrowableInformation,
LocationInfo,
CyclicBuffer, OR, VariaLevelMatchFilter,
VariaLevelRangeFilter, PatternParser,
LevelMatchFilter, DRFA,
Rolling,
ReaderWriterLock,
NDC,
Plugins,
MessageFormatter"/>
<!-- ================================================================= -->
<!-- Longer unit tests -->
<!-- ================================================================= -->
<target name="longUnit" depends=""/>
<!-- ================================================================= -->
<!-- Rolling unit tests -->
<!-- ================================================================= -->
<target name="Rolling" depends="SizeBasedRolling, Compress,
TimeBasedRolling, Renaming"/>
<!-- ================================================================= -->
<!-- Joran unit tests -->
<!-- ================================================================= -->
<target name="Joran" depends="Pattern, SimpleStore, Interpreter"/>
<!-- ================================================================= -->
<!-- ============== Regression and Unit Tests follow ================= -->
<!-- ================================================================= -->
<target name="Minimum" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.MinimumTest" />
</junit>
</target>
<target name="Logger" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.LoggerTestCase" />
</junit>
</target>
<target name="PatternLayout" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.PatternLayoutTest" />
</junit>
</target>
<target name="HierarchyThreshold" depends="build, cleanOutputDir">
<delete file="output/temp"/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.HierarchyThresholdTestCase" />
</junit>
</target>
<target name="DOM" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<jvmarg value="-Dlog4j.debug=TRUE"/>
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.xml.DOMTestCase" />
</junit>
</target>
<target name="NDC" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.NDCTestCase" />
</junit>
</target>
<target name="CustomLevel" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.xml.CustomLevelTestCase" />
</junit>
</target>
<target name="CustomLogger" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.customLogger.XLoggerTestCase" />
</junit>
</target>
<target name="DefaultInit" depends="build, cleanOutputDir">
<!-- Delete possible cruft from previous runs. -->
<delete file="classes/log4j.xml"/>
<delete file="classes/log4j.properties"/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test fork="true" name="org.apache.log4j.defaultInit.TestCase1" />
</junit>
<copy file="input/xml/defaultInit.xml" tofile="classes/log4j.xml"/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test fork="true" name="org.apache.log4j.defaultInit.TestCase2" />
</junit>
<delete file="classes/log4j.xml"/>
<!-- test handling of log4j.defaultInitOverride system property -->
<!-- log4j.defaultInitOverride system property NO LONGER SUPPORTED
<copy file="input/xml/defaultInit.xml" tofile="classes/log4j.xml"/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<jvmarg value="-Dlog4j.defaultInitOverride=true" />
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test fork="true" name="org.apache.log4j.defaultInit.TestCase1" />
</junit>
<delete file="classes/log4j.xml"/>
-->
<!-- test default initialization from log4j.xml -->
<copy file="input/defaultInit3.properties" tofile="classes/log4j.properties"/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test fork="true" name="org.apache.log4j.defaultInit.TestCase3" />
</junit>
<delete file="classes/log4j.properties"/>
<!-- test default initialization from log4j.properties -->
<copy file="input/xml/defaultInit.xml" tofile="classes/log4j.xml"/>
<copy file="input/defaultInit3.properties" tofile="classes/log4j.properties"/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test fork="true" name="org.apache.log4j.defaultInit.TestCase4" />
</junit>
<delete file="classes/log4j.xml"/>
<delete file="classes/log4j.properties"/>
</target>
<target name="SocketServer" depends="build, cleanOutputDir">
<parallel>
<java classname="org.apache.log4j.net.ShortSocketServer" fork="yes">
<arg value="8"/>
<arg value="input/net/socketServer"/>
<classpath refid="tests.classpath"/>
</java>
<sequential>
<sleep seconds="2"/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.net.SocketServerTestCase" />
</junit>
</sequential>
</parallel>
</target>
<target name="XMLLayout" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.xml.XMLLayoutTestCase" />
</junit>
</target>
<target name="AsyncAppender" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.AsyncAppenderTestCase" />
</junit>
</target>
<target name="VariaLevelMatchFilter" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.varia.LevelMatchFilterTestCase" />
</junit>
</target>
<target name="VariaLevelRangeFilter" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.varia.LevelRangeFilterTestCase" />
</junit>
</target>
<target name="FiltersLevelMatchFilter" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.filters.LevelMatchFilterTestCase" />
</junit>
</target>
<target name="LevelMatchFilter" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.varia.LevelMatchFilterTestCase" />
</junit>
</target>
<target name="ErrorHandler" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.varia.ErrorHandlerTestCase" />
</junit>
</target>
<target name="OptionSubstitutionTest" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.helpers.OptionSubstitutionTest" />
</junit>
</target>
<target name="LevelOptionConverterTest" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.helpers.LevelOptionConverterTest" />
</junit>
</target>
<target name="BoundedFIFO" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.helpers.BoundedFIFOTestCase" />
</junit>
</target>
<target name="CyclicBuffer" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.helpers.CyclicBufferTestCase" />
</junit>
</target>
<target name="PatternParser" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.pattern.PatternParserTest" />
</junit>
</target>
<target name="MazeAppender" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.MazeAppenderTestCase" />
</junit>
</target>
<target name="OR" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.or.ORTestCase" />
</junit>
</target>
<target name="DRFA" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.DRFATestCase" />
</junit>
</target>
<target name="Plugins" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.plugins.PluginTestCase" />
</junit>
</target>
<target name="FileNamePattern" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.rolling.helper.FileNamePatternTestCase" />
</junit>
</target>
<target name="SizeBasedRolling" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.rolling.SizeBasedRollingTest" />
</junit>
</target>
<target name="TimeBasedRolling" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.rolling.TimeBasedRollingTest" />
</junit>
</target>
<target name="MultiplexAppenderTest" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.multiplex.MultiplexAppenderTest" />
</junit>
</target>
<target name="Compress" depends="build, cleanOutputDir">
<!-- The input files are erased as a result of compression. We -->
<!-- need to "create" them afresh for each test. -->
<copy file="input/compress1.copy" toFile="input/compress1.txt"/>
<copy file="input/compress2.copy" toFile="input/compress2.txt"/>
<copy file="input/compress3.copy" toFile="input/compress3.txt"/>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.rolling.helper.CompressTestCase" />
</junit>
</target>
<!-- Start Renaming test and FileOpener near simultaneously. Have FileOpener
keep the file test.log open. This tests the ability of RollingFileAppender
to deal with renaming of files opened by other processes.
-->
<target name="Renaming" depends="build, cleanOutputDir">
<parallel>
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.rolling.RenamingTest" />
</junit>
<sequential>
<sleep seconds="1"/>
<java classname="org.apache.log4j.rolling.FileOpener" fork="yes">
<classpath refid="tests.classpath"/>
</java>
</sequential>
</parallel>
</target>
<target name="Pattern" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.joran.PatternTest" />
</junit>
</target>
<target name="SimpleStore" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.joran.SimpleStoreTest" />
</junit>
</target>
<target name="Interpreter" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.joran.InterpreterTest" />
</junit>
</target>
<target name="Scheduler" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false" />
<test name="org.apache.log4j.scheduler.SchedulerTest" />
</junit>
</target>
<target name="ThrowableInformation" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.spi.ThrowableInformationTest" />
</junit>
</target>
<target name="LocationInfo" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.spi.location.LocationInfoTest" />
</junit>
</target>
<target name="MessageFormatter" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.helpers.MessageFormatterTest" />
</junit>
</target>
<!-- ================================================================= -->
<!-- ========================= DB Tests ======================= -->
<!-- ================================================================= -->
<!-- These tests follow the same pattern. They will be run if a property file
defining access as well as necessary class files are available. Otherwise,
the test is skipped.
-->
<!-- The target that performs the actual test -->
<target name="invokeDBTestCase">
<junit printsummary="yes" fork="no" haltonfailure="yes">
<sysproperty key="toto" value="${toto}"/>
<sysproperty key="appendConfigFile" value="${appendConfigFile}"/>
<sysproperty key="readConfigFile" value="${readConfigFile}"/>
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.db.FullCycleDBTest" />
</junit>
</target>
<!-- the following target is shared by MySQL and PostgreSQL targets -->
<target name="commonDB">
<property file="./input/db/db.properties"/>
<!-- This task deletes existing entries in the database -->
<!-- Do not use on a table with valuable dataset -->
<input
message="All data is going to be deleted from DB. Continue (y/n)?"
validargs="y,n"
addproperty="do.delete"
/>
<condition property="do.abort">
<equals arg1="n" arg2="${do.delete}"/>
</condition>
<fail if="do.abort">Build aborted by user.</fail>
<sql driver="${driverClass}"
url="${url}"
userid="${user}"
password="${password}"
src="./input/db/deleteTables.sql">
<classpath refid="tests.classpath"/>
</sql>
<echo message="Running test case with DriverManager config file"/>
<antcall target="invokeDBTestCase">
<param name="appendConfigFile" value="./input/db/append-with-drivermanager1.xml"/>
<param name="readConfigFile" value="./input/db/read-with-drivermanager1.xml"/>
</antcall>
<echo message="Running test case with DataSource"/>
<antcall target="invokeDBTestCase">
<param name="appendConfigFile" value="./input/db/append-with-datasource1.xml"/>
<param name="readConfigFile" value="./input/db/read-with-datasource1.xml"/>
</antcall>
<echo message="Running test case with a native *pooled* DataSource"/>
<antcall target="invokeDBTestCase">
<param name="appendConfigFile" value="./input/db/append-with-pooled-datasource1.xml"/>
<param name="readConfigFile" value="./input/db/read-with-pooled-datasource1.xml"/>
</antcall>
<echo message="Running test case with a DataSource with JNDI"/>
<antcall target="invokeDBTestCase">
<param name="appendConfigFile" value="./input/db/append-with-jndi1.xml"/>
<param name="readConfigFile" value="./input/db/read-with-jndi1.xml"/>
</antcall>
</target>
<!-- ============ hsqldb specific tests ============== -->
<target name="hsqldbCheck">
<condition property="hsqldb-present">
<and>
<available file="./input/db/hsqldb.properties" />
<available classname="org.hsqldb.jdbcDriver">
<classpath refid="tests.classpath"/>
</available>
</and>
</condition>
</target>
<target name="hsqldb" depends="hsqldbCheck, build" if="hsqldb-present">
<delete file="./input/db/db.properties"/>
<echo message="hsqldb available"/>
<copy file="./input/db/hsqldb.properties" tofile="./input/db/db.properties"/>
<echo message="Running test case with DriverManager config file"/>
<antcall target="invokeDBTestCase">
<param name="appendConfigFile" value="./input/db/append-with-drivermanager1.xml"/>
<param name="readConfigFile" value="./input/db/read-with-drivermanager1.xml"/>
</antcall>
</target>
<!-- ============ MySQL specific tests ============== -->
<target name="mysqlCheck">
<condition property="mysql-present">
<and>
<available file="./input/db/mysql.properties" />
<available classname="com.mysql.jdbc.Driver">
<classpath refid="tests.classpath"/>
</available>
</and>
</condition>
</target>
<target name="mysql" depends="mysqlCheck, build" if="mysql-present">
<delete file="./input/db/db.properties"/>
<echo message="MySQL available"/>
<copy file="./input/db/mysql.properties" tofile="./input/db/db.properties"/>
<antcall target="commonDB"/>
</target>
<!-- ============ PostgreSQL specific tests ============== -->
<target name="postgresqlCheck">
<condition property="postgresql-present">
<and>
<available file="./input/db/postgresql.properties" />
<available classname="org.postgresql.Driver">
<classpath refid="tests.classpath"/>
</available>
</and>
</condition>
</target>
<target name="postgresql" depends="postgresqlCheck, build" if="postgresql-present">
<delete file="./input/db/db.properties"/>
<echo message="PostgreSQL available"/>
<copy file="./input/db/postgresql.properties" tofile="./input/db/db.properties"/>
<antcall target="commonDB"/>
</target>
<!-- ============ Oracle specific tests ============== -->
<target name="oracleCheck">
<condition property="oracle-present">
<and>
<available file="./input/db/oracle.properties" />
<available classname="oracle.jdbc.driver.OracleDriver">
<classpath refid="tests.classpath"/>
</available>
</and>
</condition>
</target>
<target name="oracle" depends="oracleCheck, build" if="oracle-present">
<delete file="./input/db/db.properties"/>
<echo message="Oracle available"/>
<copy file="./input/db/oracle.properties" tofile="./input/db/db.properties"/>
<antcall target="commonDB"/>
</target>
<!-- ============ MS SQL Server specific tests ============== -->
<target name="msSqlCheck">
<condition property="msSql-present">
<and>
<available file="./input/db/msSql.properties" />
<available classname="weblogic.jdbc.mssqlserver4.Driver">
<classpath refid="tests.classpath"/>
</available>
</and>
</condition>
</target>
<target name="msSql" depends="msSqlCheck, build" if="msSql-present">
<delete file="./input/db/db.properties"/>
<echo message="Ms Sql available"/>
<copy file="./input/db/msSql.properties" tofile="./input/db/db.properties"/>
<antcall target="commonDB"/>
</target>
<!-- ================================================================= -->
<!-- ========================= long Tests ========================= -->
<!-- ================================================================= -->
<target name="ReaderWriterLock" depends="build, cleanOutputDir">
<junit printsummary="yes" fork="no" haltonfailure="yes">
<sysproperty key="runLen" value="100"/>
<classpath refid="tests.classpath"/>
<formatter type="plain" usefile="false"/>
<test name="org.apache.log4j.helpers.ReaderWriterLockTestCase" />
</junit>
</target>
</project>