summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-18 07:24:05 -0600
committerSimon Glass <sjg@chromium.org>2023-07-20 14:10:58 -0600
commit35f72fb55a05ccf2a372566005f60c340924d1cc (patch)
tree94f681c47ea590da2a50575e97c223bce9273aa3 /tools/binman/ftest.py
parentf6abd5227a13e652c6a6c25173403ae19ac9e0f0 (diff)
binman: Support templating with multiple images
Allow a template to appear in the top level description when using multiple images. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index fc5d8a839e6..dd6075b871d 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -6793,6 +6793,18 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
second = U_BOOT_DATA + b'#' + VGA_DATA + U_BOOT_DTB_DATA
self.assertEqual(U_BOOT_IMG_DATA + first + second, data)
+ def testTemplateBlobMulti(self):
+ """Test using a template with 'multiple-images' enabled"""
+ TestFunctional._MakeInputFile('my-blob.bin', b'blob')
+ TestFunctional._MakeInputFile('my-blob2.bin', b'other')
+ retcode = self._DoTestFile('287_template_multi.dts')
+
+ self.assertEqual(0, retcode)
+ image = control.images['image']
+ image_fname = tools.get_output_filename('my-image.bin')
+ data = tools.read_file(image_fname)
+ self.assertEqual(b'blob@@@@other', data)
+
if __name__ == "__main__":
unittest.main()