aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/test_util.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-14 15:53:36 -0600
committerSimon Glass <sjg@chromium.org>2019-07-10 16:52:45 -0600
commit5a1af1dafeab06f0ef3bb749ec0ce59784bf8925 (patch)
tree655ceadc0a6be998a630cc41c00b9d1c79753457 /tools/patman/test_util.py
parentb1793a531e5934ea5453b7e24495e2fcddd9c493 (diff)
downloadu-boot-5a1af1dafeab06f0ef3bb749ec0ce59784bf8925.zip
u-boot-5a1af1dafeab06f0ef3bb749ec0ce59784bf8925.tar.gz
u-boot-5a1af1dafeab06f0ef3bb749ec0ce59784bf8925.tar.bz2
patman: Convert print statements to Python 3
Update all print statements to be functions, as required by Python 3. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/test_util.py')
-rw-r--r--tools/patman/test_util.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/tools/patman/test_util.py b/tools/patman/test_util.py
index 687d407..e462ec8 100644
--- a/tools/patman/test_util.py
+++ b/tools/patman/test_util.py
@@ -3,6 +3,8 @@
# Copyright (c) 2016 Google, Inc
#
+from __future__ import print_function
+
from contextlib import contextmanager
import glob
import os
@@ -54,18 +56,18 @@ def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None):
missing_list = required
missing_list.difference_update(test_set)
if missing_list:
- print 'Missing tests for %s' % (', '.join(missing_list))
- print stdout
+ print('Missing tests for %s' % (', '.join(missing_list)))
+ print(stdout)
ok = False
coverage = lines[-1].split(' ')[-1]
ok = True
- print coverage
+ print(coverage)
if coverage != '100%':
- print stdout
- print ("Type 'python-coverage html' to get a report in "
- 'htmlcov/index.html')
- print 'Coverage error: %s, but should be 100%%' % coverage
+ print(stdout)
+ print("Type 'python-coverage html' to get a report in "
+ 'htmlcov/index.html')
+ print('Coverage error: %s, but should be 100%%' % coverage)
ok = False
if not ok:
raise ValueError('Test coverage failure')