Fix failures sorting and sort by test name first.