kevinoneill 2003/08/05 22:35:34
Modified: . build.xml
Log:
Added reports target and updated unit tests to use the junit task rather than
the jva task.
Revision Changes Path
1.53 +54 -86 xml-xindice/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-xindice/build.xml,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- build.xml 4 Aug 2003 00:49:21 -0000 1.52
+++ build.xml 6 Aug 2003 05:35:34 -0000 1.53
@@ -21,6 +21,7 @@
- Fernando Padrilla ([EMAIL PROTECTED])
- James Bates ([EMAIL PROTECTED])
- Vladimir R. Bossicard ([EMAIL PROTECTED])
+ - Kevin O'Neill ([EMAIL PROTECTED])
-->
<project name="xml-xindice" default="release" basedir=".">
@@ -55,6 +56,8 @@
<property name="build.dir" value="build"/>
<property name="src.build.dir" value="${build.dir}/classes"/>
<property name="test.build.dir" value="${build.dir}/classes-tests"/>
+ <property name="test.report.dir" value="${build.dir}/test-reports"/>
+ <property name="reports.dir" value="${build.dir}/reports"/>
<property name="api.dir" value="${build.dir}/api"/>
<property name="dist.dir" value="dist"/>
<property name="javadoc.pkgs" value="org.apache.xindice.*"/>
@@ -97,6 +100,8 @@
<tstamp/>
<mkdir dir="${src.build.dir}"/>
<mkdir dir="${test.build.dir}"/>
+ <mkdir dir="${test.report.dir}"/>
+ <mkdir dir="${reports.dir}"/>
<mkdir dir="${api.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
@@ -175,98 +180,55 @@
<fileset dir="${test.src.dir}" excludes="*.java"/>
</copy>
</target>
+
<target name="test-unit" depends="test-build, test-validate">
<junit fork="yes" printsummary="yes" haltonfailure="no">
<jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=info"/>
- -->
- <test name="org.apache.xindice.UnitTests"/>
- <formatter type="plain" usefile="no"/>
+ <test name="org.apache.xindice.UnitTests"
outfile="${test.report.dir}/org.apache.xindice.UnitTests.xml"/>
+ <formatter type="xml"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${test.build.dir}"/>
</classpath>
</junit>
</target>
+
<target name="test-embed-binary" depends="test-build, test-validate">
- <java classname="junit.textui.TestRunner" fork="yes">
- <arg line="-class
org.apache.xindice.client.xmldb.resources.BinaryResourceTest"/>
- <jvmarg value="-Dxindice.home=${basedir}"/>
+ <junit fork="yes" printsummary="yes" haltonfailure="no">
<jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=info"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.log.org.apache.xindice.core=info"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.log.org.apache.xindice.xml=info"/>
- -->
+ <test
name="org.apache.xindice.client.xmldb.resources.BinaryResourceTest"
outfile="${test.report.dir}/org.apache.xindice.client.xmldb.resources.BinaryResourceTest.xml"/>
+ <formatter type="xml"/>
<classpath>
<path refid="project.class.path"/>
<pathelement location="${test.build.dir}"/>
</classpath>
- </java>
+ </junit>
</target>
+
<target name="test-integration-embed" depends="test-build,
test-validate">
- <java classname="junit.textui.TestRunner" fork="yes">
- <arg line="-class org.apache.xindice.IntegrationEmbedTests"/>
- <jvmarg
value="-DPropertyManager.file=${test.dir}/config/test-configuration.props"/>
- <jvmarg value="-Dxindice.home=${basedir}"/>
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=info"/>
- -->
- <classpath>
- <path refid="project.class.path"/>
- <pathelement location="${test.build.dir}"/>
- </classpath>
- </java>
- <!--
<junit fork="yes" printsummary="yes" haltonfailure="no">
- <jvmarg
value="-DPropertyManager.file=${test.dir}/config/test-configuration.props" />
- <jvmarg value="-Dxindice.home=${basedir}" />
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug" />
- <test name="org.apache.xindice.IntegrationEmbedTests" />
- <formatter type="plain" usefile="no" />
<classpath>
<path refid="project.class.path"/>
<pathelement location="${test.build.dir}"/>
</classpath>
+ <jvmarg
value="-DPropertyManager.file=${test.dir}/config/test-configuration.props"/>
+ <jvmarg value="-Dxindice.home=${basedir}"/>
+ <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
+
+ <formatter type="xml"/>
+
+ <test name="org.apache.xindice.IntegrationEmbedTests"
outfile="${test.report.dir}/org.apache.xindice.IntegrationEmbedTests.xml"/>
</junit>
--->
</target>
+
<target name="test-integration-xmlrpc" depends="test-build,
test-validate">
- <!--
- <junit fork="yes" printsummary="yes" haltonfailure="no">
- <jvmarg
value="-DPropertyManager.file=${test.dir}/config/test-configuration.props" />
- <jvmarg value="-Dxindice.home=${basedir}" />
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug" />
- <jvmarg
- value="-Dxindice.xmlrpc.hostport=${xmlrpc.hostport}" />
- <jvmarg
-
value="-Dxindice.xmlrpc.service-location=${xmlrpc.service-location}" />
- <test name="org.apache.xindice.IntegrationXmlRpcTests" />
- <formatter type="plain" usefile="no" />
- <classpath>
- <path refid="project.class.path"/>
- <pathelement location="${test.build.dir}"/>
- </classpath>
- </junit>
--->
<echo message="XML-RPC driver='${test.xmlrpc.driver}'"/>
<echo message="XML-RPC host/port='${test.xmlrpc.hostport}'"/>
<echo message="XML-RPC service
location='${test.xmlrpc.service-location}'"/>
- <java classname="junit.textui.TestRunner" fork="yes">
- <arg line="-class org.apache.xindice.IntegrationXmlRpcTests"/>
+
+ <junit fork="yes" printsummary="yes" haltonfailure="no">
<jvmarg value="-Dxindice.home=${basedir}"/>
<jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug"/>
- -->
<jvmarg value="-Dtest.xmlrpc.hostport=${test.xmlrpc.hostport}"/>
<jvmarg
value="-Dtest.xmlrpc.service-location=${test.xmlrpc.service-location}"/>
<jvmarg value="-Dtest.xmlrpc.driver=${test.xmlrpc.driver}"/>
@@ -274,38 +236,29 @@
<path refid="project.class.path"/>
<pathelement location="${test.build.dir}"/>
</classpath>
- </java>
+
+ <formatter type="xml" />
+
+ <test name="org.apache.xindice.IntegrationXmlRpcTests"
outfile="${test.report.dir}/org.apache.xindice.IntegrationXmlRpcTests.xml"/>
+ </junit>
</target>
+
<target name="test-integration-managed" depends="test-build,
test-validate">
- <java classname="junit.textui.TestRunner" fork="yes">
- <arg line="-class org.apache.xindice.IntegrationManagedTests"/>
- <jvmarg
value="-DPropertyManager.file=${test.dir}/config/test-configuration.props"/>
- <jvmarg value="-Dxindice.home=${basedir}"/>
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
- <!--
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=info"/>
- -->
- <classpath>
- <path refid="project.class.path"/>
- <pathelement location="${test.build.dir}"/>
- </classpath>
- </java>
- <!--
<junit fork="yes" printsummary="yes" haltonfailure="no">
- <jvmarg
value="-DPropertyManager.file=${test.dir}/config/test-configuration.props" />
- <jvmarg value="-Dxindice.home=${basedir}" />
- <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
/>
- <jvmarg
value="-Dorg.apache.commons.logging.simplelog.defaultlog=debug" />
- <test name="org.apache.xindice.IntegrationEmbedTests" />
- <formatter type="plain" usefile="no" />
<classpath>
<path refid="project.class.path"/>
<pathelement location="${test.build.dir}"/>
</classpath>
+ <jvmarg
value="-DPropertyManager.file=${test.dir}/config/test-configuration.props"/>
+ <jvmarg value="-Dxindice.home=${basedir}"/>
+ <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog"/>
+
+ <formatter type="xml"/>
+
+ <test name="org.apache.xindice.IntegrationManagedTests"
outfile="${test.report.dir}/org.apache.xindice.IntegrationManagedTests.xml"/>
</junit>
--->
</target>
+
<target name="test-validate">
<taskdef name="testClassValidator"
classname="junitx.ant.TestClassValidatorTask">
<classpath>
@@ -323,11 +276,26 @@
</fileset>
</testClassValidator>
</target>
+
<target name="test-all"
depends="test-unit, test-embed-binary, test-integration-embed,
test-integration-xmlrpc, test-integration-managed">
</target>
+
<target name="test-clean">
<delete dir="${test.build.dir}"/>
+ </target>
+
+ <!-- reports -->
+
+ <target name="reports" depends="test-report" description="Generate all
project reports"/>
+
+ <target name="test-report" depends="test-all">
+ <junitreport todir="${test.report.dir}">
+ <fileset dir="${test.report.dir}">
+ <include name="*.xml"/>
+ </fileset>
+ <report format="frames" todir="${reports.dir}/test"/>
+ </junitreport>
</target>
<!-- ===================================================================
-->