Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite3d97d7

Browse files
author
Barry Lind
committed
Applied patch from Oliver Jowett to clean up the jdbc regression test build
Modified Files: jdbc/build.xml jdbc/org/postgresql/test/jdbc3/Jdbc3TestSuite.java
1 parent302f1a8 commite3d97d7

File tree

2 files changed

+42
-48
lines changed

2 files changed

+42
-48
lines changed

‎src/interfaces/jdbc/build.xml

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
This file now requires Ant 1.4.1. 2002-04-18
88
9-
$Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/build.xml,v 1.34 2003/08/1121:27:52 barry Exp $
9+
$Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/build.xml,v 1.35 2003/08/1123:42:04 barry Exp $
1010
1111
-->
1212

@@ -48,16 +48,23 @@
4848
</condition>
4949
<availableproperty="datasource"classname="javax.sql.DataSource"/>
5050
<availableproperty="ssl"classname="javax.net.ssl.SSLSocketFactory"/>
51-
<availableproperty="junit"classname="junit.framework.Test" />
51+
<availableproperty="junit"classname="junit.framework.Test"/>
52+
<availableproperty="junit.task"classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
5253
<conditionproperty="jdbc2tests">
5354
<and>
54-
<issetproperty="jdbc2"/>
55+
<or>
56+
<issetproperty="jdbc2"/>
57+
<issetproperty="jdbc3"/>
58+
</or>
5559
<issetproperty="junit"/>
5660
</and>
5761
</condition>
5862
<conditionproperty="jdbc2optionaltests">
5963
<and>
60-
<issetproperty="jdbc2"/>
64+
<or>
65+
<issetproperty="jdbc2"/>
66+
<issetproperty="jdbc3"/>
67+
</or>
6168
<issetproperty="datasource"/>
6269
<issetproperty="junit"/>
6370
</and>
@@ -82,7 +89,6 @@
8289
<jarjarfile="${jardir}/postgresql.jar">
8390
<filesetdir="${builddir}">
8491
<includename="${package}/**/*.class" />
85-
<excludename="${package}/test/**" />
8692
</fileset>
8793

8894
<filesetdir="${srcdir}">
@@ -277,62 +283,51 @@
277283
<propertyname="username"value="test" />
278284
<!-- Password must be something. Doesn't matter if trust is used!-->
279285
<propertyname="password"value="password" />
280-
<!-- junit.ui is one of textui, awtui, or swingui-->
281-
<propertyname="junit.ui"value="textui" />
282286

287+
<!-- The tests now build to a separate directory and jarfile from the
288+
driver build, to ensure we're really testing against the jar we just
289+
built, and not whatever happens to be in builddir.-->
283290

284-
<targetname="test"depends="testjdbc2,testjdbc2optional,testjdbc3">
285-
</target>
291+
<!-- This compiles and builds the test jarfile.-->
292+
<targetname="testjar"depends="jar"if="junit">
293+
<mkdirdir="${builddir}/tests"/>
294+
<javacsrcdir="${srcdir}"destdir="${builddir}/tests"debug="${debug}">
295+
<includename="${package}/test/**" />
286296

287-
<targetname="testjdbc2"depends="jar"if="jdbc2tests">
288-
<javacsrcdir="${srcdir}"destdir="${builddir}"debug="${debug}">
289-
<includename="${package}/test/jdbc2/*" />
290-
</javac>
291-
<javafork="yes"classname="junit.${junit.ui}.TestRunner"taskname="junit"failonerror="true">
292-
<argvalue="org.postgresql.test.jdbc2.Jdbc2TestSuite" />
293-
<syspropertykey="database"value="${database}" />
294-
<syspropertykey="username"value="${username}" />
295-
<syspropertykey="password"value="${password}" />
296-
<classpath>
297-
<pathelementlocation="${builddir}" />
298-
<pathelementpath="${java.class.path}" />
299-
</classpath>
300-
</java>
301-
</target>
297+
<excludename="${package}/test/jdbc2/**"unless="jdbc2tests"/>
298+
<excludename="${package}/test/jdbc2/optional/**"unless="jdbc2optionaltests" />
299+
<excludename="${package}/test/jdbc3/**"unless="jdbc3tests" />
300+
<excludename="${package}/test/util/**"unless="jdbc2optionaltests"/>
302301

303-
<targetname="testjdbc2optional"depends="jar"if="jdbc2optionaltests">
304-
<javacsrcdir="${srcdir}"destdir="${builddir}"debug="${debug}">
305-
<includename="${package}/test/jdbc2/optional/**" />
306-
<includename="${package}/test/util/**" />
307-
</javac>
308-
<javafork="yes"classname="junit.${junit.ui}.TestRunner"taskname="junit"failonerror="true">
309-
<argvalue="org.postgresql.test.jdbc2.optional.OptionalTestSuite" />
310-
<syspropertykey="database"value="${database}" />
311-
<syspropertykey="username"value="${username}" />
312-
<syspropertykey="password"value="${password}" />
313302
<classpath>
314-
<pathelementlocation="${builddir}" />
315-
<pathelementpath="${java.class.path}" />
303+
<pathelementlocation="${jardir}/postgresql.jar"/>
316304
</classpath>
317-
</java>
305+
</javac>
306+
<jarjarfile="${jardir}/postgresql-tests.jar"basedir="${builddir}/tests"/>
318307
</target>
308+
309+
<!-- This actually runs the tests-->
310+
<targetname="runtest"depends="testjar"if="junit.task">
311+
<junit>
312+
<formattertype="brief"usefile="false"/>
319313

320-
<targetname="testjdbc3"depends="jar"if="jdbc3tests">
321-
<javacsrcdir="${srcdir}"destdir="${builddir}"debug="${debug}">
322-
<includename="${package}/test/jdbc3/*" />
323-
<includename="${package}/test/util/*" />
324-
</javac>
325-
<javafork="yes"classname="junit.${junit.ui}.TestRunner"taskname="junit"failonerror="true">
326-
<argvalue="org.postgresql.test.jdbc3.Jdbc3TestSuite" />
327314
<syspropertykey="database"value="${database}" />
328315
<syspropertykey="username"value="${username}" />
329316
<syspropertykey="password"value="${password}" />
317+
330318
<classpath>
331-
<pathelementlocation="${builddir}" />
319+
<pathelementlocation="${jardir}/postgresql.jar" />
320+
<pathelementlocation="${jardir}/postgresql-tests.jar" />
332321
<pathelementpath="${java.class.path}" />
333322
</classpath>
334-
</java>
335-
</target>
336323

324+
<testname="org.postgresql.test.jdbc2.Jdbc2TestSuite"if="jdbc2tests"/>
325+
<testname="org.postgresql.test.jdbc2.optional.OptionalTestSuite"if="jdbc2optionaltests"/>
326+
<testname="org.postgresql.test.jdbc3.Jdbc3TestSuite"if="jdbc3tests"/>
327+
</junit>
328+
</target>
329+
330+
<!-- This is the target invoked by the Makefile-->
331+
<targetname="test"depends="testjar,runtest"/>
337332

338333
</project>

‎src/interfaces/jdbc/org/postgresql/test/jdbc3/Jdbc3TestSuite.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public class Jdbc3TestSuite extends TestSuite
1414
publicstaticTestSuitesuite()
1515
{
1616
TestSuitesuite =newTestSuite();
17-
suite.addTest(org.postgresql.test.jdbc2.Jdbc2TestSuite.suite());
1817
suite.addTestSuite(Jdbc3SimpleDataSourceTest.class);
1918
suite.addTestSuite(Jdbc3ConnectionPoolTest.class);
2019
suite.addTestSuite(Jdbc3PoolingDataSourceTest.class);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp