Title: tests/build.xml: Support for Oracle and MS SQL

The following change should add support for Oracle and MS SQL.  I haven't included the sample properties files yet but the fact that they are missing shouldn't hurt anything else.

Also this specifically mentions a Weblogic driver.  What should be done for that?

RCS file: /home/cvspublic/logging-log4j/tests/build.xml,v
retrieving revision 1.58
diff -u -r1.58 build.xml
--- tests/build.xml     31 May 2004 21:14:24 -0000      1.58
+++ tests/build.xml     4 Jun 2004 12:42:04 -0000
@@ -660,7 +660,47 @@
     <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  ========================= -->
   <!-- ================================================================= -->

Reply via email to