made tests return error code if any tests failed