kward 02/05/01 20:57:47
Added: java/scratchpad/tests build.xml
Log:
initial XMLRPC API tests
Revision Changes Path
1.1 xml-xindice/java/scratchpad/tests/build.xml
Index: build.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Build file for Xindice RPC Test Suite
Notes:
This is a build file for use with the Jakarta Ant java build tool.
Howto build:
To build, run
cd Xindice/java/scratchpad/tests ; ../../../bin/ant
-->
<project name="xindice-xmlrpc-tests" default="main" basedir=".">
<!-- =================================================================== -->
<!-- Initializes the build process -->
<!-- =================================================================== -->
<!-- default directory structure definitions -->
<property name="xindice.home" value="../../../"/>
<property name="root.dir" value="."/>
<property name="jar.dir" value="${root.dir}/../../lib"/>
<property name="src.dir" value="${root.dir}/src"/>
<property name="build.dir" value="${root.dir}/classes"/>
<!-- classpath to use within project -->
<path id="project.class.path">
<!-- compiled classes directory -->
<pathelement location="${build.dir}"/>
<!-- all jars in jar directory -->
<fileset dir="${jar.dir}">
<include name="*.jar"/>
</fileset>
<!-- system property, environment classpath -->
<pathelement path="${java.class.path}"/>
</path>
<target name="init">
<tstamp/>
<property name="name" value="xindice-xmlrpc-tests"/>
<property name="version" value="0.1"/>
</target>
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
<target name="prepare" depends="init">
<mkdir dir="${build.dir}"/>
</target>
<target name="main" depends="compile">
</target>
<!-- =================================================================== -->
<!-- Compiles the XML:DB API sources -->
<!-- =================================================================== -->
<target name="compile" depends="prepare">
<echo message="Compiling Xindice XML-RPC Test Cases"/>
<javac srcdir="${src.dir}"
destdir="${build.dir}"
classpathref="project.class.path"
/>
</target>
<!-- =================================================================== -->
<!-- Cleans everything -->
<!-- =================================================================== -->
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<taskdef name="xindiceadmin" classpathref="project.class.path"
classname="org.apache.xindice.tools.DeploymentTask"/>
<target name="setUp">
<echo message="adding Collection /db/tests"/>
<xindiceadmin home="${xindice.home}" activity="add_collection"
collection="/db" name="tests" />
<echo message="adding Collection /db/tests/child1"/>
<xindiceadmin home="${xindice.home}" activity="add_collection"
collection="/db/tests" name="child1" />
<echo message="adding Collection /db/tests/child2"/>
<xindiceadmin home="${xindice.home}" activity="add_collection"
collection="/db/tests" name="child2" />
</target>
<target name="tearDown">
<echo message="deleting Collection /db/tests/child2"/>
<xindiceadmin home="${xindice.home}" activity="delete_collection"
collection="/db/tests" name="child2" />
<echo message="deleting Collection /db/tests/child1"/>
<xindiceadmin home="${xindice.home}" activity="delete_collection"
collection="/db/tests" name="child1" />
<echo message="deleting Collection /db/tests"/>
<xindiceadmin home="${xindice.home}" activity="delete_collection"
collection="/db" name="tests" />
</target>
<target name="run">
<java classpathref="project.class.path" classname="XMLRPCAPITestSuite"
fork="true"/>
</target>
</project>