added the ability to run tests one at a time

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352657 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Avik Sengupta 2002-05-29 14:37:37 +00:00
parent e3beaf84a4
commit 2490325a95

103
build.xml
View File

@ -373,5 +373,108 @@
-->
&import-antipede;
<!-- ================================== -->
<!-- POI specific extensions to the the build file -->
<!-- ================================== -->
<patternset id="teststhatfail">
</patternset>
<!-- ================================== -->
<!-- run tests one at a time -->
<!-- ================================== -->
<target name="single-test" if="testcase" depends="-init,compile-tests"
description="--> runs the single unit test defined in the testcase property">
<junit2 printsummary="yes" haltonfailure="${junit.test.haltonfailure}" fork="yes">
<formatter type="xml" />
<sysproperty key="UTIL.testdata.path"
value="${xlayout.source.test.dir}/org/apache/poi/util/data"/>
<sysproperty key="HSSF.testdata.path"
value="${xlayout.source.test.dir}/org/apache/poi/hssf/data"/>
<classpath>
<path>
<fileset dir="." casesensitive="yes">
<patternset>
<include name="${cents.dir}/*.${cent.dir.suffix}/${cent.lib.dir.name}/*.jar"/>
<include name="${cents.dir}/*.${cent.dir.suffix}/${cent.lib.dir.name}/*.zip"/>
</patternset>
</fileset>
<fileset dir="${xlayout.library.dir}" casesensitive="yes">
<patternset>
<include name="*/*.jar"/>
<include name="*/*.zip"/>
</patternset>
</fileset>
<fileset dir="${xlayout.source.scratchpad.library.dir}" casesensitive="yes">
<patternset>
<include name="*.jar"/>
<include name="*.zip"/>
</patternset>
</fileset>
<fileset dir="${xlayout.source.examples.library.dir}" casesensitive="yes">
<patternset>
<include name="*.jar"/>
<include name="*.zip"/>
</patternset>
</fileset>
</path>
<pathelement path="${xlayout.build.classes.dir}" />
<pathelement location="${xlayout.build.test.dir}" />
<pathelement location="${xlayout.build.classes.dir}" />
</classpath>
<test name="${testcase}" />
</junit2>
</target>
<target name="compile-tests" depends="-init,compile">
<mkdir dir="${xlayout.build.test.dir}"/>
<!-- Compile tests -->
<javac srcdir="${xlayout.source.test.dir}"
destdir="${xlayout.build.test.dir}"
debug= "${build.compiler.debug}"
optimize= "${build.compiler.optimize}"
deprecation="${build.compiler.deprecation}"
target= "${build.compiler.vm}"
nowarn= "false">
<classpath>
<path>
<fileset dir="." casesensitive="yes">
<patternset>
<include name="${cents.dir}/*.${cent.dir.suffix}/${cent.lib.dir.name}/*.jar"/>
<include name="${cents.dir}/*.${cent.dir.suffix}/${cent.lib.dir.name}/*.zip"/>
</patternset>
</fileset>
<fileset dir="${xlayout.library.dir}" casesensitive="yes">
<patternset>
<include name="*/*.jar"/>
<include name="*/*.zip"/>
</patternset>
</fileset>
<fileset dir="${xlayout.source.scratchpad.library.dir}" casesensitive="yes">
<patternset>
<include name="*.jar"/>
<include name="*.zip"/>
</patternset>
</fileset>
<fileset dir="${xlayout.source.examples.library.dir}" casesensitive="yes">
<patternset>
<include name="*.jar"/>
<include name="*.zip"/>
</patternset>
</fileset>
</path>
<pathelement path="${xlayout.build.classes.dir}" />
</classpath>
</javac>
</target>
</project>