Fix exit code of failed tests