Return exit code 1 when test fail so that callers can detect this.
Signed-off-by: Simon Glass <sjg@chromium.org>
for test, err in result.errors:
print test.id(), err
for test, err in result.failures:
- print err
+ print err, result.failures
+ if result.errors or result.failures:
+ print 'binman tests FAILED'
+ return 1
+ return 0
def RunTestCoverage():
"""Run the tests and check that we get 100% coverage"""
sys.tracebacklimit = 0
if options.test:
- RunTests()
+ ret_code = RunTests()
elif options.test_coverage:
RunTestCoverage()