ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: parallel targets
Date Wed, 05 Nov 2008 15:08:12 GMT
car_car_car wrote:
> I need some indication if the tests fail, but i still want the other targets
> to run.
> When i say parallel i mean that a group of targets should run , not
> depending on the other target's success.

OK. That's slightly different. <junit> sets a property but does not act 
on it.

> My targets are in this pattern:
> <target name="target_b" depends="target_a">
>        ........
>        do all kind of work
>        ........
> 	<junit fork="yes" printsummary="yes" failureproperty="unittest.failed" >
> 	....
> 	       <test
> name="com.projectTarget.runnable.testrun.endToEnd.componentATR" 
> todir="${junit.output.dir}/${moduleName}"/>
> 	....
>              </junit>

>       <fail if="unittest.failed" message="There was a Problem with endToEnd
> Tests!"/> 

pull this <fail>; add a target that prints a warning

> </target>

<target name="test" depends="print-results"/>

<target name="print-results" if="unittest.failed" depends="target_b">
  <echo>There was a Problem with endToEnd Tests!"</echo>

the message is only printed if the tests failed. In our big projects we 
make the <fail> operation conditional because we may want to test lots 
of modules and not stop at the first failure;

Steve Loughran        
Author: Ant in Action 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message