On 14/05/10 5:37 AM, Shay Banon wrote:
Hi,
Can this be done now in 0.9? I mean, in a multi project build, have the
whole build fail if one of the sub projects failed, but only at the end
*after* it ran all the sub projects tests. Also, I think this should be the
default behavior.
This can't be done in 0.9.
I agree it should be the default behaviour, and possibly the only
behaviour. Gradle should try to complete as much of the requested work
as it can, subject to task dependencies, rather than just stopping on
the first failure. This should be true, not just for failed tests, but
for everything that Gradle does: checkstyle, compilation, downloads,
javadoc, whatever.
cheers,
shay.banon
Russel Winder-4 wrote:
Hans,
On Mon, 2009-10-05 at 13:01 +0200, Hans Dockter wrote:
[ . . . ]
The new native test runners we developing for 0.9 should provide a
nice solution for this.
OK, I need to be an early adopter I think !
The application is the Gant build system which is currently a 4 project
build but may end up as a 5 project one -- each project is simply a
different build of the same source (not actually a different project).
What I want to do is to ensure that all project tests are run in the
Bamboo and Buildbot CI builds even if individual ones fail.
Meanwhile you could do the following. Set stopAtFailuresOrErrors to
true and add the following hook:
gradle.taskGraph.afterTask { task, exception ->
if (task instanceof Test&& exception != null) {
// do something (for example set a property)
}
}
Have a special ci task that let the build fail if any tests in the
subprojects have failed.
For 0.9 we will have an api method of the test task that tells you
whether tests have failed or not.
Thanks, I'll give this a go tomorrow.
--
Russel.
=============================================================================
Dr Russel Winder Partner
xmpp: [email protected]
Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road, f: +44 8700 516 084 voip:
sip:[email protected]
London SW11 1EN, UK m: +44 7770 465 077 skype: russel_winder
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email