ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: junit and errorproperty
Date Mon, 16 Feb 2004 13:50:24 GMT
Bo Rasmussen wrote:

>Hi,
>
>Is the errorproperty in the junit task local for the task calling 
>junit? If i have the targets below where the unittest first calls the 
>rununittest and then creates a report. It seems that if the 
>test.failed property was set in the rununittest, then it has 
>been 'forgotten' in the unittest task! Is that correct?
>
><target name="rununittest" >
>   <junit printsummary="yes" haltonfailure="no"  
>errorproperty="test.failed" failureproperty="test.failed">
>
>   // do unittest stuff
></target>
>
><target name="unittest" >
>   <antcall target="rununittest">
>  
>
<antcall> sets up a new project/context for properties, properties
that get set in this context will not get set in the calling 
project/context.

This should read:
<target name="unittest" depends="rununittest">
   <fail if="test.failed">Tests FAILED. see...</fail>
</target>

Peter

>   // Create report
>
>   <fail if="test.failed">Tests FAILED. see report for details.</fail>
></target>
>
>Regards
>Bo
>
>
>
>
>---------------------------------------------------------------------
>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