You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Mikael Petterson (KI/EAB)" <mi...@ericsson.com> on 2005/11/25 13:33:47 UTC
how to BUILD FAILED when tests failed
Hi,
I am using the following lines for testing:
<target name="test:test" depends="test:postcompile" description="run all tests">
<junit printsummary="on" haltonfailure="no" fork="on" failureproperty="junit_test_failed" forkmode="perBatch">
<jvmarg value="-Xmx756M" />
<jvmarg value="-Demma.coverage.out.file=${coverage.dir}/coverage.emma" />
<jvmarg value="-Demma.coverage.out.merge=true" />
<classpath>
<pathelement location="${out.instr.dir}"/>
<pathelement location="${test.classes.dir}"/>
<pathelement location="${classes.dir}"/>
<path refid="test.classpath"/>
<path refid="emma.lib" />
</classpath>
<!--<formatter type="brief" usefile="true"/>-->
<formatter type="xml" usefile="true"/>
<batchtest todir="${coverage.dir}">
<fileset dir="${test.classes.dir}">
<!--<include name="**/TestItAllCreate*"/>-->
<!--<include name="**/TestRecover*"/>-->
<include name="**/TestItAll.class"/>
<include name="**/sut/*Test.class"/>
<exclude name="**/mock/**"/>
</fileset>
</batchtest>
</junit>
<fail if="junit_test_failed" message="At least one junit test failed"/>
</target>
How can I make my build to 'BUILD FAILED' and still execute the targets after test:test since it is part of another taget called test ( see below).
<target name="test" depends="test:setup,test:test,test:report">
</target>
cheers,
//mikael
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org