view tests/build.xml @ 0:a5a898f6886c

Copy of MonetDB java directory changeset e6e32756ad31.
author Sjoerd Mullender <sjoerd@acm.org>
date Wed, 21 Sep 2016 09:34:48 +0200 (2016-09-21)
parents
children 3fa949cbc783
line wrap: on
line source
<?xml version="1.0"?><!-- vim:set ts=2 sw=2 expandtab: -->

<!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0.  If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
-->

<!--

  Build file to allow ant (http://jakarta.apache.org/ant/) to be used
  to build and run the tests

-->

<project name="JDBCTests" default="compile" basedir=".">

  <property file="build.local.properties" />
  <property file="build.properties" />
  <property file="../build.properties"/> <!-- included for version -->

  <!-- set global properties for this build -->
  <property name="srcdir"    value="." />
  <property name="builddir"  value="build" />
  <property name="jardir"    value="../jars" />
  <property name="jdbc_jar"
    value="${jardir}/monetdb-jdbc-${JDBC_MAJOR}.${JDBC_MINOR}.jar" />
  <property name="jdbc_url"
    value="jdbc:monetdb://localhost/?user=monetdb&amp;password=monetdb${debug}" />
  <property name="jdbctests-jar"
    value="${jardir}/jdbctests.jar" />
  <property name="jvm.version" value="1.7"/>

  <!-- Prepares the build directory -->
  <target name="prepare">
    <mkdir dir="${builddir}" />
  </target>

  <!-- Compiles the tests -->
  <target name="compile" depends="prepare,jdbc">
    <echo message="Compiling JDBC tests" />
    <javac
      srcdir="${srcdir}"
      destdir="${builddir}"
      debug="true"
      optimize="false"
      includeantruntime="false"
      source="${jvm.version}"
      target="${jvm.version}"
      >
      <include name="**/*.java" />
      <classpath>
        <pathelement path="${srcdir}" />
        <pathelement path="${jdbc_jar}" />
      </classpath>
    </javac>
  </target>

  <!-- a convenience jar collectin all JDBC tests -->
  <target name="jar_jdbctests"
    depends="compile"
    unless="uptodate.jdbctests-jar">
    <echo message="Building JDBC tests convenience jar" />
    <jar jarfile="${jdbctests-jar}">
      <fileset dir="${builddir}">
        <include name="**/*.class" />
      </fileset>
    </jar>
  </target>

  <!-- makes sure the jdbc driver is compiled -->
  <target name="jdbc" depends="find_driver" unless="have_driver">
    <ant antfile="build.xml" dir=".." inheritAll="false" target="jar_jdbc" />
  </target>

  <target name="find_driver">
    <condition property="have_driver">
      <and>
        <available classname="nl.cwi.monetdb.jdbc.MonetDriver">
          <classpath>
            <pathelement path="${jdbc_jar}" />
          </classpath>
        </available>
      </and>
    </condition>
  </target>

  <!-- This target removes the build directory -->
  <target name="clean">
    <delete quiet="true" dir="${builddir}" />
  </target>

  <!-- Run tests -->
  <target name="test">
    <antcall target="Test_Cautocommit" />
    <antcall target="Test_Clargequery" />
    <antcall target="Test_Cmanycon" />
    <antcall target="Test_Cforkbomb" />
    <antcall target="Test_CisValid" />
    <antcall target="Test_Creplysize" />
    <antcall target="Test_Csavepoints" />
    <antcall target="Test_Ctransaction" />
    <antcall target="Test_Creplysize" />
    <antcall target="Test_Csendthread" />
    <antcall target="Test_Dobjects" />
    <antcall target="Test_PSgeneratedkeys" />
    <antcall target="Test_PSlargeresponse" />
    <antcall target="Test_PSlargeamount" />
    <antcall target="Test_PSsomeamount" />
    <antcall target="Test_PSlargebatchval" />
    <antcall target="Test_PStimedate" />
    <antcall target="Test_PStimezone" />
    <antcall target="Test_PStypes" />
    <antcall target="Test_PSmanycon" />
    <antcall target="Test_PSmetadata" />
    <antcall target="Test_PSsqldata" />
    <antcall target="Test_Rbooleans" />
    <antcall target="Test_Rmetadata" />
    <antcall target="Test_Rpositioning" />
    <antcall target="Test_Rtimedate" />
    <antcall target="Test_Rsqldata" />
    <antcall target="Test_Sbatching" />
    <antcall target="Test_Smoreresults" />
    <antcall target="Test_Int128" />
    <antcall target="Test_FetchSize" />
    <antcall target="BugConcurrent_clients_SF_1504657" />
    <antcall target="BugConcurrent_sequences" />
    <antcall target="BugDatabaseMetaData_Bug_3356" />
    <antcall target="BugDecimalRound_Bug_3561" />
  </target>

  <target name="test_class" depends="compile,jdbc">
    <echo message="Testing class ${test.class}" />
    <java classname="${test.class}" failonerror="true">
      <classpath>
        <pathelement path="${builddir}" />
        <pathelement path="${jdbc_jar}" />
      </classpath>
      <arg value="${jdbc_url}" />
    </java>
  </target>
  

  <!-- convenience targets for the outside caller to specify which
  test(s) should be run -->
  <target name="Test_Cautocommit">
    <antcall target="test_class">
      <param name="test.class" value="Test_Cautocommit" />
    </antcall>
  </target>

  <target name="Test_Csavepoints">
    <antcall target="test_class">
      <param name="test.class" value="Test_Csavepoints" />
    </antcall>
  </target>

  <target name="Test_Clargequery">
    <antcall target="test_class">
      <param name="test.class" value="Test_Clargequery" />
    </antcall>
  </target>

  <target name="Test_Cmanycon">
    <antcall target="test_class">
      <param name="test.class" value="Test_Cmanycon" />
    </antcall>
  </target>

  <target name="Test_Cforkbomb">
    <antcall target="test_class">
      <param name="test.class" value="Test_Cforkbomb" />
    </antcall>
  </target>

  <target name="Test_CisValid">
    <antcall target="test_class">
      <param name="test.class" value="Test_CisValid" />
    </antcall>
  </target>

  <target name="Test_Ctransaction">
    <antcall target="test_class">
      <param name="test.class" value="Test_Ctransaction" />
    </antcall>
  </target>

  <target name="Test_Creplysize">
    <antcall target="test_class">
      <param name="test.class" value="Test_Creplysize" />
    </antcall>
  </target>

  <target name="Test_Csendthread">
    <antcall target="test_class">
      <param name="test.class" value="Test_Csendthread" />
    </antcall>
  </target>

  <target name="Test_Dobjects">
    <antcall target="test_class">
      <param name="test.class" value="Test_Dobjects" />
    </antcall>
  </target>

  <target name="Test_Sbatching">
    <antcall target="test_class">
      <param name="test.class" value="Test_Sbatching" />
    </antcall>
  </target>

  <target name="Test_Smoreresults">
    <antcall target="test_class">
      <param name="test.class" value="Test_Smoreresults" />
    </antcall>
  </target>

  <target name="Test_PSgeneratedkeys">
    <antcall target="test_class">
      <param name="test.class" value="Test_PSgeneratedkeys" />
    </antcall>
  </target>

  <target name="Test_PSlargeresponse">
    <antcall target="test_class">
      <param name="test.class" value="Test_PSlargeresponse" />
    </antcall>
  </target>

  <target name="Test_PSlargeamount">
    <antcall target="test_class">
      <param name="test.class" value="Test_PSlargeamount" />
    </antcall>
  </target>

  <target name="Test_PSsomeamount">
    <antcall target="test_class">
      <param name="test.class" value="Test_PSsomeamount" />
    </antcall>
  </target>

  <target name="Test_PSlargebatchval">
    <antcall target="test_class">
      <param name="test.class" value="Test_PSlargebatchval" />
    </antcall>
  </target>

  <target name="Test_PStimedate">
    <antcall target="test_class">
      <param name="test.class" value="Test_PStimedate" />
    </antcall>
  </target>

  <target name="Test_PStimezone">
    <antcall target="test_class">
      <param name="test.class" value="Test_PStimezone" />
    </antcall>
  </target>

  <target name="Test_PStypes">
    <antcall target="test_class">
      <param name="test.class" value="Test_PStypes" />
    </antcall>
  </target>

  <target name="Test_PSmanycon">
    <antcall target="test_class">
      <param name="test.class" value="Test_PSmanycon" />
    </antcall>
  </target>

  <target name="Test_PSmetadata">
    <antcall target="test_class">
      <param name="test.class" value="Test_PSmetadata" />
    </antcall>
  </target>

  <target name="Test_PSsqldata">
    <antcall target="test_class">
      <param name="test.class" value="Test_PSsqldata" />
    </antcall>
  </target>

  <target name="Test_Rbooleans">
    <antcall target="test_class">
      <param name="test.class" value="Test_Rbooleans" />
    </antcall>
  </target>

  <target name="Test_Rpositioning">
    <antcall target="test_class">
      <param name="test.class" value="Test_Rpositioning" />
    </antcall>
  </target>

  <target name="Test_Rtimedate">
    <antcall target="test_class">
      <param name="test.class" value="Test_Rtimedate" />
    </antcall>
  </target>

  <target name="Test_Rsqldata">
    <antcall target="test_class">
      <param name="test.class" value="Test_Rsqldata" />
    </antcall>
  </target>

  <target name="Test_Rmetadata">
    <antcall target="test_class">
      <param name="test.class" value="Test_Rmetadata" />
    </antcall>
  </target>

  <target name="Test_Int128">
    <antcall target="test_class">
      <param name="test.class" value="Test_Int128" />
    </antcall>
  </target>
  
  <target name="Test_FetchSize">
    <antcall target="test_class">
      <param name="test.class" value="Test_FetchSize" />
    </antcall>
  </target>
  
  <target name="BugConcurrent_clients_SF_1504657">
    <antcall target="test_class">
      <param name="test.class" value="BugConcurrent_clients_SF_1504657" />
    </antcall>
  </target>

  <target name="BugConcurrent_sequences">
    <antcall target="test_class">
      <param name="test.class" value="BugConcurrent_sequences" />
    </antcall>
  </target>

  <target name="BugDatabaseMetaData_Bug_3356">
    <antcall target="test_class">
      <param name="test.class" value="BugDatabaseMetaData_Bug_3356" />
    </antcall>
  </target>

</project>