|
|
@@ -20,85 +20,85 @@ |
|
|
|
<import file="../../buildfiletest-base.xml"/> |
|
|
|
|
|
|
|
<target name="setUp"> |
|
|
|
<mkdir dir="${output}" /> |
|
|
|
<mkdir dir="${output}"/> |
|
|
|
</target> |
|
|
|
|
|
|
|
<property name="showoutput" value="false" /> |
|
|
|
<property name="showoutput" value="false"/> |
|
|
|
|
|
|
|
<path id="test"> |
|
|
|
<pathelement path="${java.class.path}" /> |
|
|
|
<pathelement location="../../../../../build/testcases" /> |
|
|
|
<pathelement path="${java.class.path}"/> |
|
|
|
<pathelement location="${build.tests.value}"/> |
|
|
|
</path> |
|
|
|
|
|
|
|
<target name="testForkedOutput"> |
|
|
|
<junit fork="yes" haltonerror="true" haltonfailure="true" |
|
|
|
showoutput="${showoutput}"> |
|
|
|
<test name="org.example.junit.Output" /> |
|
|
|
<classpath refid="test" /> |
|
|
|
<test name="org.example.junit.Output"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="testNonForkedOutput"> |
|
|
|
<junit fork="false" haltonerror="true" haltonfailure="true" |
|
|
|
showoutput="${showoutput}"> |
|
|
|
<test name="org.example.junit.Output" /> |
|
|
|
<classpath refid="test" /> |
|
|
|
<test name="org.example.junit.Output"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="testForkedThreadedOutput"> |
|
|
|
<junit fork="yes" haltonerror="true" haltonfailure="true" |
|
|
|
showoutput="${showoutput}"> |
|
|
|
<test name="org.example.junit.ThreadedOutput" /> |
|
|
|
<classpath refid="test" /> |
|
|
|
<test name="org.example.junit.ThreadedOutput"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="testNonForkedThreadedOutput"> |
|
|
|
<junit fork="false" haltonerror="true" haltonfailure="true" |
|
|
|
showoutput="${showoutput}"> |
|
|
|
<test name="org.example.junit.ThreadedOutput" /> |
|
|
|
<classpath refid="test" /> |
|
|
|
<test name="org.example.junit.ThreadedOutput"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="outputTests" |
|
|
|
depends="testForkedOutput,testNonForkedOutput,testForkedThreadedOutput,testNonForkedThreadedOutput" /> |
|
|
|
depends="testForkedOutput,testNonForkedOutput,testForkedThreadedOutput,testNonForkedThreadedOutput"/> |
|
|
|
|
|
|
|
<target name="crash"> |
|
|
|
<junit fork="true" errorproperty="crashed"> |
|
|
|
<test name="org.apache.tools.ant.taskdefs.optional.junit.VmCrash"/> |
|
|
|
<classpath refid="test" /> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="nocrash"> |
|
|
|
<junit fork="true" errorproperty="crashed"> |
|
|
|
<test name="org.apache.tools.ant.taskdefs.optional.junit.NoVmCrash"/> |
|
|
|
<classpath refid="test" /> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="timeout"> |
|
|
|
<junit fork="true" errorproperty="timeout" timeout="1000"> |
|
|
|
<test name="org.apache.tools.ant.taskdefs.optional.junit.Sleeper"/> |
|
|
|
<classpath refid="test" /> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="notimeout"> |
|
|
|
<junit fork="true" errorproperty="timeout" timeout="15000"> |
|
|
|
<test name="org.apache.tools.ant.taskdefs.optional.junit.Sleeper"/> |
|
|
|
<classpath refid="test" /> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="capture" depends="setUp"> |
|
|
|
<property name="fork" value="false"/> |
|
|
|
<junit fork="${fork}"> |
|
|
|
<test |
|
|
|
name="org.apache.tools.ant.taskdefs.optional.junit.Printer" |
|
|
|
todir="${output}" |
|
|
|
outfile="testlog"/> |
|
|
|
<test name="org.apache.tools.ant.taskdefs.optional.junit.Printer" |
|
|
|
todir="${output}" |
|
|
|
outfile="testlog"/> |
|
|
|
<formatter type="plain"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
</junit> |
|
|
@@ -120,8 +120,7 @@ |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include |
|
|
|
name="org/apache/tools/ant/taskdefs/optional/junit/*Test.java"/> |
|
|
|
<include name="org/apache/tools/ant/taskdefs/optional/junit/*Test.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
<exclude name="**/JUnitTestListenerTest.java"/> |
|
|
|
<exclude name="**/JUnitTaskTest.java"/> |
|
|
@@ -139,8 +138,7 @@ |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include |
|
|
|
name="org/apache/tools/ant/taskdefs/optional/junit/*Test.java"/> |
|
|
|
<include name="org/apache/tools/ant/taskdefs/optional/junit/*Test.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
<exclude name="**/JUnitTestListenerTest.java"/> |
|
|
|
<exclude name="**/JUnitTaskTest.java"/> |
|
|
@@ -154,12 +152,11 @@ |
|
|
|
<mkdir dir="${output}"/> |
|
|
|
<junit fork="true" forkmode="once"> |
|
|
|
<formatter extension="foo" |
|
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.TestFormatter"/> |
|
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.TestFormatter"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include |
|
|
|
name="org/apache/tools/ant/taskdefs/optional/junit/*Test.java"/> |
|
|
|
<include name="org/apache/tools/ant/taskdefs/optional/junit/*Test.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
<exclude name="**/JUnitTestListenerTest.java"/> |
|
|
|
<exclude name="**/JUnitTaskTest.java"/> |
|
|
@@ -244,8 +241,7 @@ |
|
|
|
<ant target="failureRecorder.internal" |
|
|
|
antfile="junit.xml" |
|
|
|
inheritAll="false" |
|
|
|
inheritRefs="false" |
|
|
|
/> |
|
|
|
inheritRefs="false"/> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="failureRecorder.fixing"> |
|
|
@@ -281,47 +277,46 @@ |
|
|
|
<target name="testSkippableTests"> |
|
|
|
<mkdir dir="${output}"/> |
|
|
|
<junit> |
|
|
|
<formatter type="xml"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include name="org/example/junit/JUnit4Skippable.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
</fileset> |
|
|
|
</batchtest> |
|
|
|
<formatter type="xml"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include name="org/example/junit/JUnit4Skippable.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
</fileset> |
|
|
|
</batchtest> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Skipping classes that are not tests --> |
|
|
|
<target name="testNonTests"> |
|
|
|
<mkdir dir="${output}"/> |
|
|
|
<junit> |
|
|
|
<formatter type="xml"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}" skipNonTests="true"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include name="org/example/junit/*Missed.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
</fileset> |
|
|
|
</batchtest> |
|
|
|
<junit> |
|
|
|
<formatter type="xml"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}" skipNonTests="true"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include name="org/example/junit/*Missed.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
</fileset> |
|
|
|
</batchtest> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<!-- Not skipping classes that are not tests --> |
|
|
|
<target name="testNonTestsRun"> |
|
|
|
<mkdir dir="${output}"/> |
|
|
|
<junit> |
|
|
|
<formatter type="xml"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}" skipNonTests="false"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include name="org/example/junit/*Missed.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
</fileset> |
|
|
|
</batchtest> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
<!-- Not skipping classes that are not tests --> |
|
|
|
<target name="testNonTestsRun"> |
|
|
|
<mkdir dir="${output}"/> |
|
|
|
<junit> |
|
|
|
<formatter type="xml"/> |
|
|
|
<classpath refid="test"/> |
|
|
|
<batchtest todir="${output}" skipNonTests="false"> |
|
|
|
<fileset dir="../../../../tests/junit"> |
|
|
|
<include name="org/example/junit/*Missed.java"/> |
|
|
|
<!-- tests remove out-dir on tearDown --> |
|
|
|
</fileset> |
|
|
|
</batchtest> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="testTestMethods" > |
|
|
|
<property name="tmp.dir" value="${output}"/> |
|
|
@@ -342,29 +337,28 @@ |
|
|
|
<property name="source" value="8"/> |
|
|
|
<javac srcdir="${tmp.dir}" destdir="${tmp.dir}" includes="T1.java,T2.java" |
|
|
|
source="${source}"> |
|
|
|
|
|
|
|
</javac> |
|
|
|
<junit fork="false" printsummary="true" haltonerror="true"> |
|
|
|
<classpath> |
|
|
|
<pathelement location="${tmp.dir}" /> |
|
|
|
<path refid="test" /> |
|
|
|
<pathelement location="${tmp.dir}"/> |
|
|
|
<path refid="test"/> |
|
|
|
</classpath> |
|
|
|
<test name="T1" methods="testOK" /> |
|
|
|
<test name="T2" methods="ok" /> |
|
|
|
<test name="T1" methods="testOK"/> |
|
|
|
<test name="T2" methods="ok"/> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="testCheckForkedPath"> |
|
|
|
<property name="includeantruntime" value="yes" /> |
|
|
|
<property name="includeantruntime" value="yes"/> |
|
|
|
<!-- duplicate the Ant classes into a jar --> |
|
|
|
<jar destfile="${output}/ant.jar" basedir="${antclasses}" /> |
|
|
|
<jar destfile="${output}/ant.jar" basedir="${antclasses}"/> |
|
|
|
<junit fork="yes" haltonerror="true" haltonfailure="true" |
|
|
|
showoutput="${showoutput}" includeantruntime="${includeantruntime}"> |
|
|
|
<test name="org.example.junit.Output" /> |
|
|
|
showoutput="${showoutput}" includeantruntime="${includeantruntime}"> |
|
|
|
<test name="org.example.junit.Output"/> |
|
|
|
<classpath> |
|
|
|
<pathelement location="../../../../../build/testcases" /> |
|
|
|
<pathelement location="${junitjar}" /> |
|
|
|
<pathelement location="${output}/ant.jar" /> |
|
|
|
<pathelement location="${build.tests.value}"/> |
|
|
|
<pathelement location="${junitjar}"/> |
|
|
|
<pathelement location="${output}/ant.jar"/> |
|
|
|
</classpath> |
|
|
|
</junit> |
|
|
|
</target> |
|
|
|