If test fails, return a non-zero exit code
Merge pull request #6317 from wmtan/ReturnNonZeroIfUnitTestFails

If unit test fails, return a non-zero exit code