1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 01:02:19 +02:00

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>
This commit is contained in:
Simon Glass
2019-05-14 15:53:36 -06:00
parent b1793a531e
commit 5a1af1dafe
3 changed files with 14 additions and 15 deletions

View File

@@ -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')