diff mbox series

[U-Boot,01/29] binman: Switch to 'python-coverage'

Message ID 20180606004705.79641-2-sjg@chromium.org
State Superseded
Delegated to: Simon Glass
Headers show
Series binman: Add more tests and support for updating the device tree | expand

Commit Message

Simon Glass June 6, 2018, 12:46 a.m. UTC
From: Tom Rini <trini@konsulko.com>

The most portable way to get access to coverage is to invoke it as
'python-coverage'.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/README    | 3 +--
 tools/binman/binman.py | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

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])