summaryrefslogtreecommitdiff
path: root/tools/patman/main.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-06 06:41:48 +0300
committerSimon Glass <sjg@chromium.org>2020-07-20 20:37:46 +0300
commit2e9a0cdfa8456636392f24dcc47e3270bd4818b7 (patch)
treeb9593a1d0e5ef2c2b7c3b233c6176fb751a78619 /tools/patman/main.py
parent7303ba10a4a39852b9ba356fae5656b43122eec6 (diff)
downloadu-boot-2e9a0cdfa8456636392f24dcc47e3270bd4818b7.tar.xz
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>
Diffstat (limited to 'tools/patman/main.py')
-rwxr-xr-xtools/patman/main.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/patman/main.py b/tools/patman/main.py
index 28a9a26087..03668d1bb8 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