You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Rogers <sr...@numbersix.com> on 2005/12/27 19:51:50 UTC
running mutliple ant files
i'm trying to find a function/loop that will run all ant test files in a directory that will just run one file after another even if there are errors
i've tried a few things that haven't worked, any ideas or snips of code that will put me on the right path?
Steven Rogers
Developer at NumberSix, Asheville
XXX-XXX-XXXX XXX
email: srogers at numbersix dot com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: running mutliple ant files
Posted by Wascally Wabbit <wa...@earthling.net>.
If you can use AntXtras (http://jware.info/) extensions, you could
do something like:
Example 1:
<foreach i="test-file" list="${list-of-test-files}" mode="local"
haltiferror="no" tryeach="yes" failproperty="not.clean">
<ant antfile="${test-file}"/>
</foreach>
<fail if="not.clean" message="Something barfed"/>
Example 2 (to capture logs per test iff it fails):
<property name="LOGS" value="...."/>
<foreach i="test-file" list="${list-of-test-files" mode="local"
haltiferror="no" tryeach="yes" failproperty="not.clean">
<capturelogs>
<protect>
<ant antfile="${test-file}"/>
<iferror quiet="yes">
<copylogged tofile="${LOGS}/log-${antfile}" important="no"/>
</iferror>
</protect>
</capturelogs>
</foreach>
<fail if="not.clean" message="Something barfed"/>
At 01:51 PM 12/27/2005, you wrote:
>i'm trying to find a function/loop that will run all ant test files
>in a directory that will just run one file after another even if
>there are errors
>i've tried a few things that haven't worked, any ideas or snips of
>code that will put me on the right path?
>
>Steven Rogers
>Developer at NumberSix, Asheville
>XXX-XXX-XXXX XXX
>email: srogers at numbersix dot com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
The Wabbit
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org