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