aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-11-12 21:52:29 -0700
committerSimon Glass <sjg@chromium.org>2017-11-22 18:05:38 -0700
commit9677faa34ee81c7abb4c08b0dc4ce4aace5473fc (patch)
tree3e5efbaaa2974eefb940675d0a89cd81eb392955 /tools
parentca4f4ff7cf5acb230cf1948268b60efc5e54a977 (diff)
downloadu-boot-9677faa34ee81c7abb4c08b0dc4ce4aace5473fc.zip
u-boot-9677faa34ee81c7abb4c08b0dc4ce4aace5473fc.tar.gz
u-boot-9677faa34ee81c7abb4c08b0dc4ce4aace5473fc.tar.bz2
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/binman/binman.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/binman/binman.py b/tools/binman/binman.py
index 7ad4d30..3ccf25f 100755
--- a/tools/binman/binman.py
+++ b/tools/binman/binman.py
@@ -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()