<target name="test" depends="test:setup,test:test,test:report">
<fail if="junit_test_failed">At least one test failed - see the
report.</fail>
</target>
You have collected all infos you need, you only have to use that :-)
Jan
>-----Ursprüngliche Nachricht-----
>Von: Mikael Petterson (KI/EAB) [mailto:[EMAIL PROTECTED]
>Gesendet: Freitag, 25. November 2005 13:34
>An: [email protected]
>Betreff: 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: [EMAIL PROTECTED] For
>additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]