Sets exit code to be number of failed tests.