Allow a single test to be run from ant
rfe 38645, from Matt Benson git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@400316 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a9db1350ad
commit
2b0a51fd95
25
build.xml
25
build.xml
|
@ -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>
|
||||
|
@ -304,6 +307,22 @@
|
|||
</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>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="testjar" depends="compile.tests,jar"
|
||||
|
|
|
@ -37,6 +37,10 @@ limitations under the License.
|
|||
To build a jar file, change into Collection's root directory and run "ant jar".
|
||||
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".
|
||||
|
|
Loading…
Reference in New Issue