From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | patch: clean up ant test infrastructure |
Date: | 2003-07-20 11:36:03 |
Message-ID: | 20030720113603.GI32403@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
This patch rearranges how tests are built and run from build.xml:
+ Make all testsuites (jdbc2, jdbc2.optional, jdbc3) independent
i.e. they run only their own tests and not those of earlier
versions.
+ Run all applicable testsuites for the configured JDBC version,
e.g. run jdbc2, jdbc2.optional, and jdbc3 if we are configured
for JDBC3. The rationale is that the JDBC2 tests should work
on JDBC2 *or any later version*.
+ Use Ant's <junit> task instead of running a JUnit UI. This cleans
up the buildfile and produces somewhat nicer output than the text-ui.
As Ant doesn't try to find the task class until the containing target
is run, and we conditionalize running the test task on the
presence of both JUnit and the JUnit task, this shouldn't cause
errors if the task isn't present.
+ Merge the various per-version test targets into a single target with
conditional <test> elements.
+ Use a separate builddir for the tests to help isolate them from the
driver. Build a new postgresql-tests.jar jarfile containing just the tests.
+ Run the tests using the actual driver jarfile (and test jarfile)
rather than whatever's in builddir. This should help make sure that you
are testing the actual driver that will be used. One sideeffect of this
is that PSQLException can find its resource bundle when running tests now
(previously it couldn't as srcdir was not in the test classpath).
I've tested this against Ant 1.5.3 and a 1.4 JDK, with and without JUnit and
ant-optional (for the JUnit task) present. I don't have the resources to
test other JDKs or Ant versions at the moment.
-O
Attachment | Content-Type | Size |
---|---|---|
pgsql-ant_test_changes.txt | text/plain | 8.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | pginfo | 2003-07-20 13:02:13 | Re: jdbc batch performance problem |
Previous Message | Oliver Jowett | 2003-07-20 05:51:45 | patch: avoid ant warnings about never-empty jarfiles |