Add correct exit value to failed tests
Merge pull request #1824 from mattsta/fix-test-error-signal

Add correct exit value to failed tests