<target name="run-test" depends="init-test, compile-test" unless="option.skiptest">
<mkdir dir="${test.xml}" />
<junit
haltonfailure="off"
haltonerror="off"
errorproperty="test.failed"
failureproperty="test.failed"
showoutput="no"
printsummary="yes"
includeantruntime="yes"
dir="${test.build}"
fork="true">
<classpath>
<path refid="test.classpath" />
</classpath>
<formatter type="xml"/>
<batchtest todir="${test.xml}">
<fileset refid="test.fileset" />
</batchtest>
</junit>
</target>
<target name="test" depends="run-test" unless="option.skiptest" description="Run unit tests">
<fail if="test.failed"
message="At least one test has failed. See logs (in ${test.xml}) for details (use the target test-report to run the test with a report)" />
</target>
<target name="test-report" depends="run-test" unless="option.skiptest" description="Run the test with report">
<junitreport todir="${test.xml}">
<fileset dir="${test.xml}">
<include name="TEST-*.xml"/>
</fileset>
<report format="noframes" todir="${reports}">
</report>
</junitreport>
<fail if="test.failed"
message="At least one test has failed. See logs (in ${test.xml}) or report (in ${reports})" />
</target>