At present 'dtoc -t' return a success code even if some of the tests fail.
Fix this by checking the test result and setting the exit code. This
allows 'make qcheck' to function as expected.
Signed-off-by: Simon Glass <sjg@chromium.org>
print(err)
for _, err in result.failures:
print(err)
+ if result.errors or result.failures:
+ print('dtoc tests FAILED')
+ return 1
+ return 0
def RunTestCoverage():
"""Run the tests and check that we get 100% coverage"""
# Run our meagre tests
if options.test:
- run_tests(args)
+ ret_code = run_tests(args)
+ sys.exit(ret_code)
elif options.test_coverage:
RunTestCoverage()