ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <>
Subject RE: <ant> and build failure
Date Thu, 31 Jul 2003 15:46:28 GMT
Ah, thanks for the explanation.

OK, for now I'm looking at parsing the TEST-*.xml files for "<failure" and "<error"
to indicate test failure, then I can <fail> the master build. If I say "filterchains"
am I headed in the right direction or is there a simpler way?


-----Original Message-----
From: Conor MacNeill []
Sent: 31 July 2003 15:41
To: Ant Users List
Subject: Re: <ant> and build failure

On Fri, 1 Aug 2003 12:14 am, Keith Hatton wrote:
> Hi all,
> Background: I'm using <ant> to run my JUnit tests as part of a
> <parallel>/<sequential> task while an application server is running.
> What I would like to be able to do is prevent the user from thinking all is
> well if any of the test cases fail. I can set a property in <junit> on
> failure, and <fail> the build if this is set ... but this is all going on
> in the <ant> task of the master build file.
> If I do this, at the moment the net result is my build hangs ... I think
> one thread of the <parallel> task has failed and so nothing is stopping the
> application server (which would stop the other thread).
> Is there any way to set a property in <ant> if the called file/target
> fails, rather than just fail (apparently silently)? I couldn't see a
> "failonerror" or "failure" attribute in the manual ( but I think
> this would be useful. Any other suggestions on how to achieve this welcome.

The attribute is not going to help you since the <parallel> task has hung. The 
exception prevents the shutdown which prevents parallel from finishing. 

I have added facilities to <parallel> in Ant 1.6 to fail if any of the tasks 
fail without waiting for the other threads to complete. It also supports a 


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

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

View raw message