Exit with an error code when tests fail