Fixed Rake task so it reports failures properly

Bug: 47042

Change-Id: I90306716321d3c66adceba6c72c4b82995898c0b
Merge "Fixed Rake task so it reports failures properly"