test.xml (hsqldb-2.7.0) | : | test.xml (hsqldb-2.7.1) | ||
---|---|---|---|---|
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | |||
<project name="hsqldb.test.suite" | <project name="hsqldb.test.suite" | |||
default="run.test.suite" | default="run.test.suite" | |||
basedir=".."> | basedir=".."> | |||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | |||
<!-- B U I L D T I M E S T A M P --> | > | |||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | <!-- B U I L D T I M E S T A M P -- | |||
<tstamp> | > | |||
<format property="_tmpstamp" | <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | |||
pattern="yyyy/MM/dd-hh:mm:ss" | > | |||
locale="en"/> | <tstamp> | |||
</tstamp> | <format property="_tmpstamp" | |||
pattern="yyyy/MM/dd-hh:mm:ss" | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | locale="en"/> | |||
<!-- U S E R B U I L D P R O P E R T I E S O V E R R I D E S --> | </tstamp> | |||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||||
<property file="${basedir}/build/build.properties"/> | <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | |||
> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | <!-- U S E R B U I L D P R O P E R T I E S O V E R R I D E S -- | |||
<!-- D E F A U L T B U I L D P R O P E R T I E S --> | > | |||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | |||
<property name="test.suite.version" | > | |||
value="2.7.0"/> | <property file="${basedir}/build/build.properties"/> | |||
<property name="test.suite.title" | <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | |||
value="HSQLDB Test Suite"/> | > | |||
<!-- D E F A U L T B U I L D P R O P E R T I E S -- | ||||
<property name="test.suite.vendor" | > | |||
value="The HSQL Development Group"/> | <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | |||
> | ||||
<property name="test.suite.implementation.title" | <property name="test.suite.version" | |||
value="SQL:2016 / JDBC 4.3 Conformance and Supporing Library Test C | value="2.7.0"/> | |||
ases"/> | ||||
<property name="test.suite.title" | ||||
<property name="test.suite.implementation.label" | value="HSQLDB Test Suite"/> | |||
value="private-${_tmpstamp}"/> | ||||
<property name="test.suite.vendor" | ||||
<property name="test.suite.implementation.vendor" | value="The HSQL Development Group"/> | |||
value="${user.name}"/> | ||||
<property name="test.suite.implementation.title" | ||||
<property name="sqltool.jar" | value="SQL:2016 / JDBC 4.3 Conformance and Supporing Library Test | |||
value="${basedir}/lib/sqltool.jar" /> | Cases"/> | |||
<property name="hsqldb.jar" | <property name="test.suite.implementation.label" | |||
value="${basedir}/lib/hsqldb.jar" /> | value="private-${_tmpstamp}"/> | |||
<property name="junit.jar" | <property name="test.suite.implementation.vendor" | |||
value="${basedir}/lib/junit.jar" /> | value="${user.name}"/> | |||
<property name="preprocessor.jar" | <property name="junit.jar" | |||
value="${basedir}/lib/preprocessor.jar" /> | value="${basedir}/lib/junit.jar" /> | |||
<property name="test.suite.jar" | <property name="preprocessor.jar" | |||
value="${basedir}/lib/testsuite.jar" /> | value="${basedir}/lib/preprocessor.jar" /> | |||
<property name="test.src.dir" | <property name="test.run.dir" | |||
value="${basedir}/test-src" /> | value="${basedir}/testrun" /> | |||
<property name="test.classes.dir" | <property name="test.suite.jar" | |||
value="${basedir}/test-classes" /> | value="${basedir}/lib/testsuite.jar" /> | |||
<property name="test.results.dir" | <property name="test.src.dir" | |||
value="${basedir}/test-results" /> | value="${basedir}/test-src" /> | |||
<property name="build.debug" | <property name="test.src.tmp.dir" | |||
value="true" /> | value="${basedir}/tmp/testsrc" /> | |||
<property name="build.optimize" | <property name="test.classes.dir" | |||
value="false" /> | value="${basedir}/test-classes" /> | |||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | <property name="test.results.dir" | |||
<!-- B U I L D C L A S S P A T H --> | value="${basedir}/test-results" /> | |||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||||
<path id="test.suite.javac.classpath"> | <property name="build.debug" | |||
<pathelement location="${hsqldb.jar}"/> | value="true" /> | |||
<pathelement location="${preprocessor.jar}"/> | ||||
<pathelement location="${sqltool.jar}"/> | <property name="build.optimize" | |||
<pathelement location="${junit.jar}" /> | value="false" /> | |||
</path> | ||||
<target name="-set-jvmvars"> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | <condition property="_crosswithoutbcp"> | |||
<!-- S H A R E D I N I T I A L I Z A T I O N --> | <and> | |||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | <isset property="ant.build.javac.target"/> | |||
<target name="-init"> | <not> | |||
<available classname="java.net.IDN" | <isset property="javac.bootcp.override"/> | |||
property="ant.java.iscjava16"/> | </not> | |||
</and> | ||||
</condition> | ||||
<fail if="_crosswithoutbcp"> | ||||
If cross-compiling, you must set property 'javac.bootcp.override' | ||||
</fail> | ||||
<condition property="ant.build.javac.source" | ||||
value="${ant.build.javac.target}"> | ||||
<isset property="ant.build.javac.target"/> | ||||
</condition> | ||||
<condition property="ant.java.iscjava08"> | ||||
<and> | ||||
<available classname="java.sql.JDBCType" property="ant.java.iscj | ||||
ava08"/> | ||||
<not> | ||||
<matches string="${ant.build.javac.target}" | ||||
pattern="^(?:1[.])?(1|2|3|4|5|6|7)$"/> | ||||
</not> | ||||
</and> | ||||
</condition> | ||||
<condition property="ant.java.iscjava11"> | ||||
<and> | ||||
<available classname="java.sql.ShardingKey" property="ant.java.i | ||||
scjava11"/> | ||||
<not> | ||||
<matches string="${ant.build.javac.target}" | ||||
pattern="^(?:1[.])?(1|2|3|4|5|6|7|8)$"/> | ||||
</not> | ||||
</and> | ||||
</condition> | ||||
<condition property="jar-name-suffix" | ||||
value="" | ||||
else="-jdk8"> | ||||
<isset property="ant.java.iscjava11"/> | ||||
</condition> | ||||
<fail if="debug.targetjvm"> | ||||
specified compile target: ${ant.build.javac.target} | ||||
derived version: 8?${ant.java.iscjava08} 11?${ant.java.iscjava11} | ||||
src (${ant.build.javac.source}) | ||||
targ (${ant.build.javac.target}) | ||||
bcp (${javac.bootcp.override}) | ||||
</fail> | ||||
</target> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | ||||
> | ||||
<!-- S H A R E D I N I T I A L I Z A T I O N -- | ||||
> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | ||||
> | ||||
<target name="-init" depends="-set-jvmvars"> | ||||
<fail unless='ant.java.iscjava16' | <fail unless='ant.java.iscjava08' | |||
message="JDK must be 1.6 or greater"/> | message="JDK must be 1.8 or greater"/> | |||
<property name="hsqldb.jar" | ||||
value="${basedir}/lib/hsqldb${jar-name-suffix}.jar"/> | ||||
<available file="${hsqldb.jar}" | <available file="${hsqldb.jar}" | |||
type='file' | type='file' | |||
property="hsqldb.available"/> | property="hsqldb.available"/> | |||
<fail unless='hsqldb.available' | <fail unless="hsqldb.available" | |||
message="'hsqldb.jar' must reside at ${hsqldb.jar}"/> | message="hsqldb jar must reside at ${hsqldb.jar}"/> | |||
<available file="${preprocessor.jar}" | <available file="${preprocessor.jar}" | |||
type='file' | type='file' | |||
property="preprocessor.available"/> | property="preprocessor.available"/> | |||
<fail unless='preprocessor.available' | <fail unless='preprocessor.available' | |||
message="'preprocessor.jar' must reside at ${preprocessor.jar}"/> | message="'preprocessor.jar' must reside at ${preprocessor.jar}"/> | |||
<property name="sqltool.jar" | ||||
value="${basedir}/lib/sqltool${jar-name-suffix}.jar" /> | ||||
<available file="${sqltool.jar}" | <available file="${sqltool.jar}" | |||
type='file' | type='file' | |||
property="sqltool.available"/> | property="sqltool.available"/> | |||
<fail unless='sqltool.available' | <fail unless="sqltool.available" | |||
message="'sqltool.jar' must reside at ${sqltool.jar}"/> | message="sqltool jar must reside at ${sqltool.jar}"/> | |||
<available file="${junit.jar}" | <available file="${junit.jar}" | |||
type='file' | type="file" | |||
property="junit.available"/> | property="junit.available"/> | |||
<fail unless='junit.available' | <fail unless='junit.available' | |||
message="'junit.jar' must reside at ${junit.jar}"/> | message="junit jar must reside at ${junit.jar}"/> | |||
</target> | <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | |||
<!-- B U I L D C L A S S P A T H --> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||||
<path id="test.suite.javac.classpath"> | ||||
<pathelement location="${hsqldb.jar}"/> | ||||
<pathelement location="${preprocessor.jar}"/> | ||||
<pathelement location="${sqltool.jar}"/> | ||||
<pathelement location="${junit.jar}" /> | ||||
</path> | ||||
</target> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | ||||
> | ||||
<!-- M A K E T E S T S U I T E -- | ||||
> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | ||||
> | ||||
<target name="make.test.suite" | ||||
description="Builds test classes and creates test suite jar" | ||||
depends="-init"> | ||||
<mkdir dir="${test.classes.dir}"/> | ||||
<mkdir dir="${test.src.tmp.dir}/org/hsqldb/test"/> | ||||
<copy todir="${test.src.tmp.dir}/org/hsqldb/test"> | ||||
<fileset dir="${basedir}/src/org/hsqldb/test"> | ||||
<include name="TestBase.java"/> | ||||
<include name="TestConnectionSettings.java"/> | ||||
<include name="TestDirectorySettings.java"/> | ||||
<include name="TestUtil.java"/> | ||||
<include name="Waiter.java"/> | ||||
<include name="TestStoredProcedure.java"/> | ||||
</fileset> | ||||
</copy> | ||||
<!-- Compile Classes --> | ||||
<javac destdir="${test.classes.dir}" | ||||
debug="${build.debug}" | ||||
optimize="${build.optimize}" | ||||
includeantruntime="false" | ||||
> | ||||
<compilerarg value="-Xlint:-path"/> | ||||
<src path="${test.src.dir}"/> | ||||
<src path="${test.src.tmp.dir}"/> | ||||
<classpath refid="test.suite.javac.classpath"/> | ||||
<include name="**/*.java"/> | ||||
<!-- @todo --> | ||||
<exclude name="/org/hsqldb/testbase/jtm/*.java"/> | ||||
</javac> | ||||
<!-- Build Jar --> | ||||
<jar jarfile="${test.suite.jar}" | ||||
basedir="${test.classes.dir}"> | ||||
<manifest> | ||||
<attribute name='Specification-Title' | ||||
value='${test.suite.title}'/> | ||||
<attribute name='Specification-Version' | ||||
value='${test.suite.version}'/> | ||||
<attribute name='Specification-Vendor' | ||||
value='${test.suite.vendor}'/> | ||||
<attribute name='Implementation-Title' | ||||
value='${test.suite.implementation.title}'/> | ||||
<attribute name='Implementation-Version' | ||||
value='${test.suite.implementation.label}'/> | ||||
<attribute name='Implementation-Vendor' | ||||
value='${test.suite.implementation.vendor}'/> | ||||
</manifest> | ||||
<fileset dir="test-src" includes="org/hsqldb/resources/*"/> | ||||
<fileset dir="test-src" includes="org/hsqldb/jdbc/*.sql"/> | ||||
<fileset dir="test-src" includes="org/hsqldb/jdbc/resources/sql/*"/> | ||||
<fileset dir="test-src" includes="org/hsqldb/jdbc/resources/xml/*"/> | ||||
</jar> | ||||
</target> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | ||||
> | ||||
<!-- R U N T E S T S U I T E -- | ||||
> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | ||||
> | ||||
<target name="run.test.suite" | ||||
description="Runs the test suite and generates test result reports" | ||||
depends="-init"> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | <available file="${test.suite.jar}" | |||
<!-- M A K E T E S T S U I T E --> | type='file' | |||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | property="test.suite.jar.available"/> | |||
<target name="make.test.suite" | ||||
description="Builds test classes and creates test suite jar" | ||||
depends="-init"> | ||||
<mkdir dir="${test.classes.dir}"/> | ||||
<!-- Compile Classes --> | ||||
<javac srcdir="${test.src.dir}" | ||||
destdir="${test.classes.dir}" | ||||
debug="${build.debug}" | ||||
optimize="${build.optimize}" | ||||
> | ||||
<classpath refid="test.suite.javac.classpath"/> | ||||
<exclude name="**/TestWrapperInvocationHandler.java"/> | ||||
<!-- Temporarily excluding TestWrapperInvocationHandler until have | ||||
time to figure out how to resolve missing java.sql.* classes --> | ||||
<include name="**/*.java"/> | ||||
</javac> | ||||
<!-- Build Jar --> | ||||
<jar jarfile="${test.suite.jar}" | ||||
basedir="${test.classes.dir}"> | ||||
<manifest> | ||||
<attribute name='Specification-Title' | ||||
value='${test.suite.title}'/> | ||||
<attribute name='Specification-Version' | ||||
value='${test.suite.version}'/> | ||||
<attribute name='Specification-Vendor' | ||||
value='${test.suite.vendor}'/> | ||||
<attribute name='Implementation-Title' | ||||
value='${test.suite.implementation.title}'/> | ||||
<attribute name='Implementation-Version' | ||||
value='${test.suite.implementation.label}'/> | ||||
<attribute name='Implementation-Vendor' | ||||
value='${test.suite.implementation.vendor}'/> | ||||
</manifest> | ||||
<fileset dir="test-src" includes="org/hsqldb/resources/*"/> | ||||
</jar> | ||||
</target> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||||
<!-- R U N T E S T S U I T E --> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||||
<target name="run.test.suite" | ||||
description="Runs the test suite and generates test result reports" | ||||
depends="-init"> | ||||
<available file="${test.suite.jar}" | ||||
type='file' | ||||
property="test.suite.jar.available"/> | ||||
<fail unless='test.suite.jar.available' | ||||
message="The test suite jar must reside at ${test.suite.jar}"/> | ||||
<delete dir="${test.results.dir}"/> | ||||
<mkdir dir="${test.results.dir}"/> | ||||
<mkdir dir="${test.results.dir}/resources"/> | ||||
<mkdir dir="${test.results.dir}/resources/org"/> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb"/> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/util"/> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/util/preprocessor"/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/util/preprocessor"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/util/preprocessor" | ||||
includes="*.exp"/> | ||||
</copy> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/util/preprocessor"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/util/preprocessor" | ||||
includes="*.inc"/> | ||||
</copy> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/util/preprocessor"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/util/preprocessor" | ||||
includes="*.src"/> | ||||
</copy> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/jdbc"/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/jdbc"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/jdbc" | ||||
includes="*.sql"/> | ||||
</copy> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/jdbc/resources"/> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/jdbc/resources/xml"/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/jdbc/resources/xml"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/jdbc/resources/xml" | ||||
includes="*.*"/> | ||||
</copy> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/jdbc/resources/sql"/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/jdbc/resources/sql"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/jdbc/resources/sql" | ||||
includes="*.*"/> | ||||
</copy> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/resources"/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/resources"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/resources" includes="*.*"/> | ||||
</copy> | ||||
<echo>Starting JUnit Tests...</echo> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
--> | ||||
<!-- U S E R T E S T P R O P E R T I E S | ||||
--> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
--> | ||||
<!-- Now using BundleHandler facility as primary properties loader, but | ||||
--> | ||||
<!-- System properties still work (e.g. on command line -Dfoo=xyz or | ||||
--> | ||||
<!-- using Ant to load properties files) and now take precedence over | ||||
--> | ||||
<!-- bundle handler resources. | ||||
--> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
--> | ||||
<!-- In this way, the bulk of the standard properties (that will probably | ||||
--> | ||||
<!-- never need to be overriden) stay under the test source folder, hence | ||||
--> | ||||
<!-- only specific property overrides need to be placed in the build | ||||
--> | ||||
<!-- folder properties files or on the command line as -Dx=y directives. | ||||
--> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
--> | ||||
<!-- The only (minor) disadvantage of this new scheme is that the bulk of | ||||
--> | ||||
<!-- the test properties will no longer show up in the test report output | ||||
--> | ||||
<!-- as environment settings | ||||
--> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
--> | ||||
<property file="${basedir}/build/test.properties"/> | ||||
<property file="${basedir}/build/test.dbmd.convert.properties"/> | ||||
<!-- Execute JUNIT Tests --> | ||||
<junit showoutput="true" | ||||
fork="false" | ||||
failureproperty="tests.failed" | ||||
errorproperty="tests.failed" > | ||||
<batchtest todir="${test.results.dir}"> | ||||
<fileset dir="${test.src.dir}" | ||||
includes="org/hsqldb/jdbc/**/*Test.java" | ||||
excludes="org/hsqldb/jdbc/ScriptedTest | ||||
.java" | ||||
/> | ||||
<fileset dir="${test.src.dir}" | ||||
includes="org/hsqldb/lib/**/*Test.java"/> | ||||
<fileset dir="${test.src.dir}" | ||||
includes="org/hsqldb/persist/**/*Test.java"/> | ||||
<fileset dir="${test.src.dir}" | ||||
includes="org/hsqldb/store/**/*Test.java"/> | ||||
<fileset dir="${test.src.dir}" | ||||
includes="org/hsqldb/types/**/*Test.java"/> | ||||
<fileset dir="${test.src.dir}" | ||||
includes="org/hsqldb/util/**/*Test.java"/> | ||||
</batchtest> | ||||
<classpath> | ||||
<!-- Placed first to avoid issues with JAR resource URL handling - | ||||
-> | ||||
<!-- e.g. relative system id XML DTD, XSD and entites --> | ||||
<pathelement location="${test.results.dir}/resources"/> | ||||
<path path="${hsqldb.jar}"/> | ||||
<path path="${preprocessor.jar}"/> | ||||
<path path="${sqltool.jar}"/> | ||||
<path path="${junit.jar}"/> | ||||
<path path="${test.suite.jar}"/> | ||||
</classpath> | ||||
<syspropertyset id="test.suite.system.properties"> | ||||
<propertyref prefix="hsqldb.test.suite."/> | ||||
</syspropertyset> | ||||
<formatter type="xml"/> | ||||
</junit> | ||||
<echo>Generating Test Reports...</echo> | ||||
<mkdir dir="${test.results.dir}/reports"/> | ||||
<mkdir dir="${test.results.dir}/reports/html"/> | ||||
<!-- Generate Test Reports --> | ||||
<junitreport todir="${test.results.dir}/reports"> | ||||
<fileset dir="${test.results.dir}"> | ||||
<include name="TEST-*.xml"/> | ||||
</fileset> | ||||
<report format="frames" | ||||
todir="${test.results.dir}/reports/html"/> | ||||
</junitreport> | ||||
</target> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||||
<!-- C L E A N T E S T S U I T E --> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||||
<target name="clean.test.suite" | ||||
description="Deletes compiled classes, test results and suite jar"> | ||||
<delete dir="${test.classes.dir}" /> | ||||
<delete dir="${test.results.dir}" /> | ||||
<delete file="${test.suite.jar}" /> | ||||
</target> | ||||
<fail unless="test.suite.jar.available" | ||||
message="The test suite jar must reside at ${test.suite.jar}. | ||||
Try running the make.test.suite target first."/> | ||||
<delete dir="${test.results.dir}"/> | ||||
<!-- FILE VERSJUS JAR RESOURCES AVOID ISSUES SUCH AS XML SYSTEM ID HANDL | ||||
ING --> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/util/preprocessor"/ | ||||
> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/util/preprocessor" | ||||
> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/util/preprocessor" | ||||
includes="*.exp"/> | ||||
</copy> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/util/preprocessor" | ||||
> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/util/preprocessor" | ||||
includes="*.inc"/> | ||||
</copy> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/util/preprocessor" | ||||
> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/util/preprocessor" | ||||
includes="*.src"/> | ||||
</copy> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/jdbc"/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/jdbc"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/jdbc" | ||||
includes="*.sql"/> | ||||
</copy> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/jdbc/resources"/> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/jdbc/resources/xml" | ||||
/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/jdbc/resources/xml | ||||
"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/jdbc/resources/xml" | ||||
includes="*.*"/> | ||||
</copy> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/jdbc/resources/sql" | ||||
/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/jdbc/resources/sql | ||||
"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/jdbc/resources/sql" | ||||
includes="*.*"/> | ||||
</copy> | ||||
<mkdir dir="${test.results.dir}/resources/org/hsqldb/resources"/> | ||||
<copy todir="${test.results.dir}/resources/org/hsqldb/resources"> | ||||
<fileset dir="${test.src.dir}/org/hsqldb/resources" includes="*.*"/> | ||||
</copy> | ||||
<echo>Starting JUnit Tests...</echo> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
~ --> | ||||
<!-- U S E R T E S T P R O P E R T I E S | ||||
--> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
~ --> | ||||
<!-- Now using BundleHandler facility as primary properties loader, but | ||||
--> | ||||
<!-- System properties still work (e.g. on command line -Dfoo=xyz or | ||||
--> | ||||
<!-- using Ant to load properties files) and now take precedence over | ||||
--> | ||||
<!-- bundle handler resources. | ||||
--> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
~ --> | ||||
<!-- In this way, the bulk of the standard properties (that will probabl | ||||
y --> | ||||
<!-- never need to be overriden) stay under the test source folder, henc | ||||
e --> | ||||
<!-- only specific property overrides need to be placed in the build | ||||
--> | ||||
<!-- folder properties files or on the command line as -Dx=y directives. | ||||
--> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
~ --> | ||||
<!-- The only (minor) disadvantage of this new scheme is that the bulk o | ||||
f --> | ||||
<!-- the test properties will no longer show up in the test report outpu | ||||
t --> | ||||
<!-- as environment settings | ||||
--> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
~ --> | ||||
<property file="${basedir}/build/test.properties"/> | ||||
<property file="${basedir}/build/test.dbmd.convert.properties"/> | ||||
<!-- Execute JUNIT Tests --> | ||||
<junit showoutput="true" | ||||
fork="false" | ||||
failureproperty="tests.failed" | ||||
errorproperty="tests.failed" > | ||||
<batchtest todir="${test.results.dir}"> | ||||
<fileset dir="${test.src.dir}" | ||||
includes="**/*Test.java"> | ||||
<exclude name="org/hsqldb/testbase/**"/> | ||||
<exclude name="org/hsqldb/jdbc/testbase/**"/> | ||||
</fileset> | ||||
</batchtest> | ||||
<classpath> | ||||
<!-- Placed first to avoid issues with JAR resource URL handling | ||||
--> | ||||
<!-- e.g. relative system id XML DTD, XSD and entites --> | ||||
<pathelement location="${test.results.dir}/resources"/> | ||||
<pathelement location="${test.run.dir}"/> | ||||
<path path="${hsqldb.jar}"/> | ||||
<path path="${preprocessor.jar}"/> | ||||
<path path="${sqltool.jar}"/> | ||||
<path path="${junit.jar}"/> | ||||
<path path="${test.suite.jar}"/> | ||||
</classpath> | ||||
<syspropertyset id="test.suite.system.properties"> | ||||
<propertyref prefix="hsqldb.test.suite."/> | ||||
</syspropertyset> | ||||
<formatter type="xml"/> | ||||
</junit> | ||||
<echo>Generating Test Reports...</echo> | ||||
<mkdir dir="${test.results.dir}/reports"/> | ||||
<mkdir dir="${test.results.dir}/reports/html"/> | ||||
<!-- Generate Test Reports --> | ||||
<junitreport todir="${test.results.dir}/reports"> | ||||
<fileset dir="${test.results.dir}"> | ||||
<include name="TEST-*.xml"/> | ||||
</fileset> | ||||
<report format="frames" | ||||
todir="${test.results.dir}/reports/html"/> | ||||
</junitreport> | ||||
</target> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | ||||
> | ||||
<!-- C L E A N T E S T S U I T E -- | ||||
> | ||||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- | ||||
> | ||||
<target name="clean.test.suite" | ||||
description="Deletes compiled classes, test results and suite jar"> | ||||
<delete dir="${test.classes.dir}" /> | ||||
<delete dir="${test.results.dir}" /> | ||||
<delete dir="${test.src.tmp.dir}" /> | ||||
<delete file="${test.suite.jar}" /> | ||||
</target> | ||||
</project> | </project> | |||
End of changes. 10 change blocks. | ||||
304 lines changed or deleted | 399 lines changed or added |