How to fail the build after all tests have run in a multi-project build?

In a multi-project build, I would like to run all the tests to completion even if some fail, then fail the build if there were test failures. What’s the best way to do this?

The easiest way is to run the build with ‘–continue’.