diff options
author | Simon Glass <sjg@chromium.org> | 2022-03-05 20:19:05 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-03-18 19:24:25 -0600 |
commit | 72e423c6b6664ff77b46c732f8d7e2e173b3b5fe (patch) | |
tree | d07400ebe3dee62f4ea7107f8178a6069d0a951d /tools/binman/ftest.py | |
parent | 3817ad4c1c2d62be15f657e6647afcc93faf1d55 (diff) |
binman: Allow mkimage to use a non-zero fake-blob size
Unfortunately mkimage gets upset with zero-sized files. Update the
ObtainContents() method to support specifying the size, if a fake blob is
created.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 18a6b140d54..3d672e6e3e8 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -5314,6 +5314,16 @@ fdt fdtmap Extract the devicetree blob from the fdtmap "Node '/binman/u-boot': Please use 'extend-size' instead of 'expand-size'", str(e.exception)) + def testMkimageMissingBlob(self): + """Test using mkimage to build an image""" + with test_util.capture_sys_output() as (stdout, stderr): + self._DoTestFile('229_mkimage_missing.dts', allow_missing=True, + allow_fake_blobs=True) + err = stderr.getvalue() + self.assertRegex( + err, + "Image '.*' has faked external blobs and is non-functional: .*") + if __name__ == "__main__": unittest.main() |