[U-Boot] [PATCH 01/29] binman: Switch to 'python-coverage'
Simon Glass
sjg at chromium.org
Wed Jun 6 00:46:37 UTC 2018
From: Tom Rini <trini at konsulko.com>
The most portable way to get access to coverage is to invoke it as
'python-coverage'.
Cc: Simon Glass <sjg at chromium.org>
Signed-off-by: Tom Rini <trini at konsulko.com>
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/binman/README | 3 +--
tools/binman/binman.py | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/binman/README b/tools/binman/README
index 22f21bc5b44..f74e39242f6 100644
--- a/tools/binman/README
+++ b/tools/binman/README
@@ -583,8 +583,7 @@ implementations target 100% test coverage. Run 'binman -T' to check this.
To enable Python test coverage on Debian-type distributions (e.g. Ubuntu):
- $ sudo apt-get install python-pip python-pytest
- $ sudo pip install coverage
+ $ sudo apt-get install python-coverage python-pytest
Advanced Features / Technical docs
diff --git a/tools/binman/binman.py b/tools/binman/binman.py
index 31b045337d2..f3044ca2124 100755
--- a/tools/binman/binman.py
+++ b/tools/binman/binman.py
@@ -81,11 +81,11 @@ def RunTests(debug, args):
def RunTestCoverage():
"""Run the tests and check that we get 100% coverage"""
# This uses the build output from sandbox_spl to get _libfdt.so
- cmd = ('PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools coverage run '
+ cmd = ('PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools python-coverage run '
'--include "tools/binman/*.py" --omit "*test*,*binman.py" '
'tools/binman/binman.py -t' % options.build_dir)
os.system(cmd)
- stdout = command.Output('coverage', 'report')
+ stdout = command.Output('python-coverage', 'report')
lines = stdout.splitlines()
test_set= set([os.path.basename(line.split()[0])
--
2.17.1.1185.g55be947832-goog
More information about the U-Boot
mailing list