ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Mitchell <geoff_mitch...@homedecorators.com>
Subject Re: "catching" test failure/error (or more generally failure within <subant> calls)
Date Mon, 24 Sep 2007 22:58:00 GMT
Use the "failureproperty" attribute of the junit task to set a property 
on failure.  How to propagate that back to your top level build is 
another question.  You could write out a file and check for it, I suppose.

Greg Irvine wrote:

>I would like to fail our build on junit test failure and still produce the
>junit report.
>
>Easy enough generally, however, our build runs somewhat similarly to make in
>that I have an ant properties file in each folder that describes the list of
>folders to build within that folder, and using common imported generic build
>files, it recurses through folders until it finds a project and does a build
>(<javac>, <jar>, <junit>, etc).
>Once all folders have been recursed through the top level build.xml produces
>the report.
>
>The problem I have is that because the <junit> call is done within each
>project (eventually, via a tree of nested <subant> calls) if I use the
>haltonfailure/haltonerror attributes of <junit> the build fails within the
>nested build file and never returns to the top level build file to produce
>the report.
>
>Any suggestions?
>
>
>Cheers.
>
>Greg
>
>
>Ps. The reason I've nested things like this is because there may be projects
>in the folder structure I don't want in the main build (for one reason or
>another), so I use the properties to specify which subfolders to build
>throughout the full structure.
>Perhaps if I shifted the lists of folders a single list/file at the top
>level I could remove the <subant> nesting and just have a top level file...
>hmm... any other suggestions welcome...
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>

-- 
Geoffrey Mitchell
Programmer/Analyst
Home Decorator's Collection
314-684-1062


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


Mime
View raw message