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-20 11:37:47 -0600
commit5f850fb9a62659edaa81167a4acc879c0ea104fc (patch)
tree0bb5362a5c9286d4eba4832c185ffb692f98105b /tools/binman/ftest.py
parent894f63575574e153ac813b7a1d20bf5d251af2ac (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 f8d5191672..7c8b3eb3a0 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()