summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-09 18:39:38 -0600
committerSimon Glass <sjg@chromium.org>2020-07-25 14:46:57 -0600
commit4f9f1056ecf2d9e54803b89fd0784240a8d89fd8 (patch)
tree11f385fc3a6d6d0938a3f690693500ec21afc020 /tools/binman/ftest.py
parent04e6a6b9ecdc75023edeebe73286f311c40b346b (diff)
binman: Allow external binaries to be missing
Sometimes it is useful to build an image even though external binaries are not present. This allows the build system to continue to function without these files, albeit not producing valid images. U-Boot does with with ATF (ARM Trusted Firmware) today. Add a new flag to binman to request this behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
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 f8d51916723..7c8b3eb3a09 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -285,7 +285,7 @@ class TestFunctional(unittest.TestCase):
def _DoTestFile(self, fname, debug=False, map=False, update_dtb=False,
entry_args=None, images=None, use_real_dtb=False,
- verbosity=None):
+ verbosity=None, allow_missing=False):
"""Run binman with a given test file
Args:
@@ -319,6 +319,8 @@ class TestFunctional(unittest.TestCase):
if entry_args:
for arg, value in entry_args.items():
args.append('-a%s=%s' % (arg, value))
+ if allow_missing:
+ args.append('-M')
if images:
for image in images:
args += ['-i', image]
@@ -3376,6 +3378,10 @@ class TestFunctional(unittest.TestCase):
self.assertIn("Filename 'missing-file' not found in input path",
str(e.exception))
+ def testExtblobMissingOk(self):
+ """Test an image with an missing external blob that is allowed"""
+ self._DoTestFile('158_blob_ext_missing.dts', allow_missing=True)
+
if __name__ == "__main__":
unittest.main()