Now you may run a single JUnit test via a command-line like 'ant
check-one -Dsoletest=org.thdl.tib.text.tshegbar.UnicodeUtilsTest'. This saves you the time of running the slow tests.
This commit is contained in:
parent
c4f4288d2f
commit
3115f22484
2 changed files with 25 additions and 2 deletions
11
build.xml
11
build.xml
|
@ -197,6 +197,17 @@ Contributor(s): ______________________________________.
|
|||
</target>
|
||||
|
||||
|
||||
<target name="check-one"
|
||||
description="Compiles and runs a single named JUnit test."
|
||||
depends="compile-junit-tests">
|
||||
<ant antfile="junitbuild.xml" target="run-one-junit-test"
|
||||
inheritAll="false" inheritRefs="false">
|
||||
<reference refid="entire.class.path"/>
|
||||
<property name="soletest" value="${soletest}"/>
|
||||
<property name="junitbin" value="${junitbin}"/>
|
||||
</ant>
|
||||
</target>
|
||||
|
||||
<!--
|
||||
See http://thdltools.sourceforge.net/BuildSystems.html for full
|
||||
details on unit testing our software. If you're eager enough
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
<!-- This creates output files TEST* in the Jskad/ directory. -->
|
||||
<target name="run-headed-junit-tests"
|
||||
description="Assuming that compilation of appropriate classes has been done, this target runs all the JUnit tests in the project.">
|
||||
description="Assuming that compilation of appropriate classes has been done, this target runs all the non-headless JUnit tests in the project.">
|
||||
<junit fork="no" printsummary="yes" haltonfailure="${halt.after.trouble}" haltonerror="${halt.after.trouble}">
|
||||
<!-- we don't halt on error because you get an error when you run
|
||||
on a headless display -->
|
||||
|
@ -49,8 +49,20 @@
|
|||
<test name="org.thdl.tib.input.DuffPaneTest"/>
|
||||
</junit>
|
||||
</target>
|
||||
<target name="run-one-junit-test"
|
||||
description="Runs soletest, a single JUnit test [class].">
|
||||
<junit fork="no" printsummary="yes" haltonfailure="true" haltonerror="true">
|
||||
<classpath>
|
||||
<pathelement location="${junitbin}"/>
|
||||
<path refid="entire.class.path"/>
|
||||
</classpath>
|
||||
<formatter type="xml"/><!-- If not XML, then 'ant -buildfile
|
||||
build.xml check-report' will fail. -->
|
||||
<test name="${soletest}"/>
|
||||
</junit>
|
||||
</target>
|
||||
<target name="run-headless-junit-tests"
|
||||
description="Assuming that compilation of appropriate classes has been done, this target runs all the JUnit tests in the project.">
|
||||
description="Assuming that compilation of appropriate classes has been done, this target runs all the headless JUnit tests in the project.">
|
||||
<junit fork="no" printsummary="yes" haltonfailure="yes" haltonerror="yes">
|
||||
<sysproperty key="java.awt.headless" value="true"/>
|
||||
<classpath>
|
||||
|
|
Loading…
Reference in a new issue