We have our large build broken into many build files with a master build that calls each of them with an ant target. In the case of unit tests, we want to be able to run all of the tests (so reports are generated) and then fail the entire build on an error or failure at the end. I understand errorProperty and failureProperty (doc) can be used to set a property to true to be referenced at the end of the build, but don’t know how to bubble that back up to the top level build. How can we bubble up a JUnit failure or error from a sub build, but only fail once all tests are done?
We have our large build broken into many build files with a master build
Share
One option is to use AntUnit:
AntUnit provides a summary for each subproject tested and fails the entire build if one of the subprojects fails.
In master build.xml
Subproject build.xml