mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 09:42:22 +02:00
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: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -58,7 +58,11 @@ def RunTests():
|
|||||||
for test, err in result.errors:
|
for test, err in result.errors:
|
||||||
print test.id(), err
|
print test.id(), err
|
||||||
for test, err in result.failures:
|
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():
|
def RunTestCoverage():
|
||||||
"""Run the tests and check that we get 100% coverage"""
|
"""Run the tests and check that we get 100% coverage"""
|
||||||
@@ -106,7 +110,7 @@ def RunBinman(options, args):
|
|||||||
sys.tracebacklimit = 0
|
sys.tracebacklimit = 0
|
||||||
|
|
||||||
if options.test:
|
if options.test:
|
||||||
RunTests()
|
ret_code = RunTests()
|
||||||
|
|
||||||
elif options.test_coverage:
|
elif options.test_coverage:
|
||||||
RunTestCoverage()
|
RunTestCoverage()
|
||||||
|
Reference in New Issue
Block a user