mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
changes for new Datasource
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
This file now requires Ant 1.4.1. 2002-04-18
|
This file now requires Ant 1.4.1. 2002-04-18
|
||||||
|
|
||||||
$Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/build.xml,v 1.25 2002/07/23 03:59:54 barry Exp $
|
$Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/build.xml,v 1.26 2002/07/30 11:38:13 davec Exp $
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -21,8 +21,8 @@
|
|||||||
<property name="jardir" value="jars" />
|
<property name="jardir" value="jars" />
|
||||||
<property name="builddir" value="build" />
|
<property name="builddir" value="build" />
|
||||||
<property name="package" value="org/postgresql" />
|
<property name="package" value="org/postgresql" />
|
||||||
<property name="debug" value="off" />
|
<property name="debug" value="on" />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This is a simpler method than utils.CheckVersion
|
This is a simpler method than utils.CheckVersion
|
||||||
It defaults to jdbc1, but builds jdbc2 if the java.lang.Byte class is
|
It defaults to jdbc1, but builds jdbc2 if the java.lang.Byte class is
|
||||||
@ -40,10 +40,10 @@
|
|||||||
<equals arg1="${ant.java.version}" arg2="1.2"/>
|
<equals arg1="${ant.java.version}" arg2="1.2"/>
|
||||||
<equals arg1="${ant.java.version}" arg2="1.3"/>
|
<equals arg1="${ant.java.version}" arg2="1.3"/>
|
||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
<condition property="jdbc3">
|
<condition property="jdbc3">
|
||||||
<equals arg1="${ant.java.version}" arg2="1.4"/>
|
<equals arg1="${ant.java.version}" arg2="1.4"/>
|
||||||
</condition>
|
</condition>
|
||||||
<available property="datasource" classname="javax.sql.DataSource"/>
|
<available property="datasource" classname="javax.sql.DataSource"/>
|
||||||
<available property="junit" classname="junit.framework.Test" />
|
<available property="junit" classname="junit.framework.Test" />
|
||||||
</target>
|
</target>
|
||||||
@ -88,15 +88,18 @@
|
|||||||
<exclude name="${package}/jdbc1/**" unless="jdbc1"/>
|
<exclude name="${package}/jdbc1/**" unless="jdbc1"/>
|
||||||
<exclude name="${package}/jdbc2/**" unless="jdbc2"/>
|
<exclude name="${package}/jdbc2/**" unless="jdbc2"/>
|
||||||
<exclude name="${package}/jdbc3/**" unless="jdbc3"/>
|
<exclude name="${package}/jdbc3/**" unless="jdbc3"/>
|
||||||
|
|
||||||
<exclude name="${package}/largeobject/PGblob.java" if="jdbc1" />
|
<exclude name="${package}/largeobject/PGblob.java" if="jdbc1" />
|
||||||
<exclude name="${package}/largeobject/PGclob.java" if="jdbc1" />
|
<exclude name="${package}/largeobject/PGclob.java" if="jdbc1" />
|
||||||
|
|
||||||
<exclude name="${package}/PostgresqlDataSource.java" unless="datasource" />
|
<exclude name="${package}/jdbc2/optional/**" unless="datasource" />
|
||||||
<exclude name="${package}/xa/**" unless="datasource" />
|
|
||||||
|
<exclude name="${package}/PostgresqlDataSource.java" />
|
||||||
|
<exclude name="${package}/xa/**" />
|
||||||
|
|
||||||
<exclude name="${package}/test/**" unless="junit" />
|
<exclude name="${package}/test/**" unless="junit" />
|
||||||
<exclude name="${package}/test/jdbc2/**" if="jdbc1" />
|
<exclude name="${package}/test/jdbc2/**" if="jdbc1" />
|
||||||
|
<exclude name="${package}/test/jdbc2/optional/**" unless="datasource" />
|
||||||
<exclude name="${package}/test/JDBC2Tests.java" if="jdbc1" />
|
<exclude name="${package}/test/JDBC2Tests.java" if="jdbc1" />
|
||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
@ -115,7 +118,7 @@
|
|||||||
<equals arg1="${jdbc2}" arg2="true"/>
|
<equals arg1="${jdbc2}" arg2="true"/>
|
||||||
</condition>
|
</condition>
|
||||||
<condition property="edition" value="JDBC3">
|
<condition property="edition" value="JDBC3">
|
||||||
<equals arg1="${jdbc3}" arg2="true"/>
|
<equals arg1="${jdbc3}" arg2="true"/>
|
||||||
</condition>
|
</condition>
|
||||||
<condition property="edition" value="JDBC2 Enterprise">
|
<condition property="edition" value="JDBC2 Enterprise">
|
||||||
<and>
|
<and>
|
||||||
@ -212,7 +215,7 @@
|
|||||||
|
|
||||||
<!-- defaults for the tests - override these if required -->
|
<!-- defaults for the tests - override these if required -->
|
||||||
<property name="database" value="jdbc:postgresql:test" />
|
<property name="database" value="jdbc:postgresql:test" />
|
||||||
<property name="username" value="test" />
|
<property name="username" value="postgres" />
|
||||||
<!-- Password must be something. Doesn't matter if trust is used! -->
|
<!-- Password must be something. Doesn't matter if trust is used! -->
|
||||||
<property name="password" value="password" />
|
<property name="password" value="password" />
|
||||||
<!-- junit.ui is one of textui, awtui, or swingui -->
|
<!-- junit.ui is one of textui, awtui, or swingui -->
|
||||||
|
@ -2,9 +2,11 @@ package org.postgresql.test;
|
|||||||
|
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
import junit.framework.Test;
|
||||||
|
|
||||||
import org.postgresql.test.jdbc2.*;
|
import org.postgresql.test.jdbc2.*;
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Executes all known tests for JDBC2 and includes some utility methods.
|
* Executes all known tests for JDBC2 and includes some utility methods.
|
||||||
@ -229,6 +231,16 @@ public class JDBC2Tests extends TestSuite
|
|||||||
suite.addTestSuite( UpdateableResultTest.class );
|
suite.addTestSuite( UpdateableResultTest.class );
|
||||||
|
|
||||||
suite.addTestSuite( CallableStmtTest.class );
|
suite.addTestSuite( CallableStmtTest.class );
|
||||||
|
|
||||||
|
// try to load the optional test classes
|
||||||
|
try {
|
||||||
|
Class cls = Class.forName("org.postgresql.test.jdbc2.optional.OptionalTestSuite");
|
||||||
|
Method meth = cls.getMethod("suite", new Class[0]);
|
||||||
|
suite.addTest((Test)meth.invoke(null, new Object[0]));
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.println("Excluding JDBC 2 Optional Package (DataSource) tests");
|
||||||
|
}
|
||||||
|
|
||||||
// That's all folks
|
// That's all folks
|
||||||
return suite;
|
return suite;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user