You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2006/05/06 16:18:42 UTC
svn commit: r400316 - in /jakarta/commons/proper/collections/trunk:
build.xml xdocs/building.xml
Author: scolebourne
Date: Sat May 6 07:18:39 2006
New Revision: 400316
URL: http://svn.apache.org/viewcvs?rev=400316&view=rev
Log:
Allow a single test to be run from ant
rfe 38645, from Matt Benson
Modified:
jakarta/commons/proper/collections/trunk/build.xml
jakarta/commons/proper/collections/trunk/xdocs/building.xml
Modified: jakarta/commons/proper/collections/trunk/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/build.xml?rev=400316&r1=400315&r2=400316&view=diff
==============================================================================
--- jakarta/commons/proper/collections/trunk/build.xml (original)
+++ jakarta/commons/proper/collections/trunk/build.xml Sat May 6 07:18:39 2006
@@ -277,9 +277,12 @@
<!-- ====================================================================== -->
- <!-- Used to obtain more detailed info on test failures -->
- <target name="test" depends="compile.tests"
- description="Run all unit test cases">
+ <!-- Tests collections, either running all or one test -->
+ <target name="test" depends="-test-all,-test-single"
+ description="Run unit tests" />
+
+ <!-- Runs all tests -->
+ <target name="-test-all" depends="compile.tests" unless="testcase">
<junit printsummary="yes" haltonfailure="yes" showoutput="yes">
<formatter type="brief" />
<classpath>
@@ -301,6 +304,22 @@
</fileset>
<formatter type="brief" usefile="false" />
</batchtest>
+ </junit>
+ </target>
+
+ <!-- Runs a single test -->
+ <target name="-test-single" depends="compile.tests" if="testcase">
+ <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
+ <formatter type="brief" />
+ <classpath>
+ <pathelement location="${build.classes}"/>
+ <pathelement location="${build.tests}"/>
+ <pathelement location="${junit.jar}"/>
+ </classpath>
+
+ <test name="${testcase}" fork="yes">
+ <formatter type="brief" usefile="false" />
+ </test>
</junit>
</target>
Modified: jakarta/commons/proper/collections/trunk/xdocs/building.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/collections/trunk/xdocs/building.xml?rev=400316&r1=400315&r2=400316&view=diff
==============================================================================
--- jakarta/commons/proper/collections/trunk/xdocs/building.xml (original)
+++ jakarta/commons/proper/collections/trunk/xdocs/building.xml Sat May 6 07:18:39 2006
@@ -38,6 +38,10 @@
The result will be in the "build" subdirectory.
</p>
<p>
+ All tests can be run with "ant test".
+ A single test can be run with "ant -Dtestcase=org.apache.commons.collections.TestXxx test".
+ </p>
+ <p>
To build the Javadocs, run "ant javadoc".
The result will be in "build/docs/apidocs".
</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org