ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: how to BUILD FAILED when tests failed
Date Fri, 25 Nov 2005 12:40:27 GMT
<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:mikael.petterson@ericsson.com] 
>Gesendet: Freitag, 25. November 2005 13:34
>An: user@ant.apache.org
>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: user-unsubscribe@ant.apache.org For 
>additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message