From: Simon Glass <sjg@chromium.org>
Date: Mon, 13 Nov 2017 04:52:19 +0000 (-0700)
Subject: binman: Append to PYTHONPATH when running test coverage
X-Git-Tag: v2025.01-rc5-pxa1908~5354^2~10
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/%7B%7B?a=commitdiff_plain;h=5a3f2226043cd46d446ab6eba39e47d131b47175;p=u-boot.git

binman: Append to PYTHONPATH when running test coverage

Rather that overwrite this, append to it, in case the caller has already
set up the path correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/tools/binman/binman.py b/tools/binman/binman.py
index d264bcdfa8..963d43a376 100755
--- a/tools/binman/binman.py
+++ b/tools/binman/binman.py
@@ -58,7 +58,7 @@ def RunTests():
 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=%s/sandbox_spl/tools coverage run '
+    cmd = ('PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools coverage run '
             '--include "tools/binman/*.py" --omit "*test*,*binman.py" '
             'tools/binman/binman.py -t' % options.build_dir)
     os.system(cmd)