summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-08 22:18:50 +0300
committerSimon Glass <sjg@chromium.org>2019-07-24 22:53:44 +0300
commit8acce60b10f2d60945b71f527fd29ee62242b175 (patch)
tree27a459a577222833ec3c7a7793207294d2c239f0 /tools/binman/ftest.py
parentd5164a79703df76254d8c0ac67037d629d113518 (diff)
downloadu-boot-8acce60b10f2d60945b71f527fd29ee62242b175.tar.xz
binman: Pass the toolpath to tests
Tools like ifwitool may not be available in the PATH, but are available in the build. These tools may be needed by tests, so allow tests to use the --toolpath flag. Also use this flag with travis. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 256d4a1c5d..3455b8cceb 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -144,7 +144,8 @@ class TestFunctional(unittest.TestCase):
self._indir = None
@classmethod
- def setup_test_args(cls, preserve_indir=False, preserve_outdirs=False):
+ def setup_test_args(cls, preserve_indir=False, preserve_outdirs=False,
+ toolpath=None):
"""Accept arguments controlling test execution
Args:
@@ -153,9 +154,11 @@ class TestFunctional(unittest.TestCase):
preserve_outdir: Preserve the output directories used by tests. Each
test has its own, so this is normally only useful when running a
single test.
+ toolpath: ist of paths to use for tools
"""
cls.preserve_indir = preserve_indir
cls.preserve_outdirs = preserve_outdirs
+ cls.toolpath = toolpath
def setUp(self):
# Enable this to turn on debugging output
@@ -256,6 +259,9 @@ class TestFunctional(unittest.TestCase):
if images:
for image in images:
args += ['-i', image]
+ if self.toolpath:
+ for path in self.toolpath:
+ args += ['--toolpath', path]
return self._DoBinman(*args)
def _SetupDtb(self, fname, outfile='u-boot.dtb'):