You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jon Jagger <jo...@jaggersoft.com> on 2005/02/28 16:02:37 UTC
if junit batchtest is skipped also skip junitreport?
I have a package based ant setup which uses the following...
<macrodef name="run-test"
<attribute name="package"//>
...
<sequential>
...
<junit errorProperty="test.failed" ...>
...
<formatter type="xml"/>
<batchtest todir="..."
unless="@{package}.tests.uptodate">
...
<batchtest>
</junit>
...
<fail if="test.failed"/>
...
<junitreport todir="....>
...
</junitreport>
</sequential>
</macrodef>
This works but I'd like to run the junitreport only if batchtest
actually runs some tests. In other words, I like an unless on
junitreport to mirror the unless on batchtest. But there isn't one and I
can't see an obvious answer in chapter 4 of Erik & Steve's excellent ant
book. Is there a way to do this without resorting to the <if> ant-contrib?
Also, I'm using a flag file to indicate whether a test-run passed or
failed. That way I can rerun the tests even if none of the code being
tested or the code doing the tests has changed. Exactly as Erik and
Steve suggest in chapter 4 (pages 106-108). Is there a way to stop the
<delete> task from echoing a successful deletion message to the console?
Many thanks
Jon
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org