If running the tests parallelised, correctly detect failures and exit with a nonzero status code.