patman: Use test_util to show test results

This handles skipped tests correctly, so use it instead of the existing
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-07-05 21:41:48 -06:00
parent ada61f1ee2
commit 0b3d24a779
2 changed files with 5 additions and 9 deletions

View File

@@ -25,6 +25,7 @@ from patman import patchstream
from patman import project
from patman import settings
from patman import terminal
from patman import test_util
from patman import test_checkpatch
@@ -101,12 +102,7 @@ elif options.test:
suite = doctest.DocTestSuite(module)
suite.run(result)
# TODO: Surely we can just 'print' result?
print(result)
for test, err in result.errors:
print(err)
for test, err in result.failures:
print(err)
sys.exit(test_util.ReportResult('patman', None, result))
# Called from git with a patch filename as argument
# Printout a list of additional CC recipients for this patch