On Oct 4, 2009, at 7:31 PM, Russel Winder wrote:

On Sun, 2009-10-04 at 18:53 +0200, Levi Hoogenberg wrote:
So, if I understand you correctly, if one of the subprojects' tests
fail, you would like the build to continue, but still like it to fail
in the end?

Yes.

The requirement here is to be able to run all the tests for all the
projects in a CI system.  So, as you sat, a project's test fail
shouldn't stop the other projects tests running but the final return
code needs to be failure.

The new native test runners we developing for 0.9 should provide a nice solution for this.

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.

- Hans

--
Hans Dockter
Gradle Project Manager
http://www.gradle.org



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to