From 0b3d24a7790d436bb611e5e10c4d0c06ea04fd3c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 5 Jul 2020 21:41:48 -0600 Subject: 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 --- tools/patman/main.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tools/patman/main.py') diff --git a/tools/patman/main.py b/tools/patman/main.py index 28a9a260879..03668d1bb8c 100755 --- a/tools/patman/main.py +++ b/tools/patman/main.py @@ -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 -- cgit v1.2.3