提交 9677faa3 编写于 作者: S Simon Glass

binman: Return non-zero exit code on test failure

Return exit code 1 when test fail so that callers can detect this.
Signed-off-by: NSimon Glass <sjg@chromium.org>
上级 ca4f4ff7
......@@ -58,7 +58,11 @@ def RunTests():
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"""
......@@ -106,7 +110,7 @@ def RunBinman(options, args):
sys.tracebacklimit = 0
if options.test:
RunTests()
ret_code = RunTests()
elif options.test_coverage:
RunTestCoverage()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册