Distinguish between test failures and errors - JENKINS-4951

fix for [JENKINS-4951](https://issues.jenkins-ci.org/browse/JENKINS-4951)

review needed ;)