ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikael Petterson (KI/EAB)" <mikael.petter...@ericsson.com>
Subject how to BUILD FAILED when tests failed
Date Fri, 25 Nov 2005 12:33:47 GMT
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


Mime
View raw message