summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-18 07:24:04 -0600
committerSimon Glass <sjg@chromium.org>2023-07-20 14:10:58 -0600
commitf6abd5227a13e652c6a6c25173403ae19ac9e0f0 (patch)
tree2f883f9bbcd18f50e7a0aa26802b51b66de68896 /tools/binman/ftest.py
parent55e1278d5eca233421c92122e7fe2361eb010710 (diff)
binman: Support simple templates
Collections can used to collect the contents of other entries into a single entry, but they result in a single entry, with the original entries 'left behind' in their old place. It is useful to be able to specific a set of entries ones and have it used in multiple images, or parts of an image. Implement this mechanism. 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, 8 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index dc9a95d341e..fc5d8a839e6 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -6785,6 +6785,14 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
data = self._DoReadFileDtb('285_spl_expand.dts',
use_expanded=True, entry_args=entry_args)[0]
+ def testTemplate(self):
+ """Test using a template"""
+ TestFunctional._MakeInputFile('vga2.bin', b'#' + VGA_DATA)
+ data = self._DoReadFile('286_template.dts')
+ first = U_BOOT_DATA + VGA_DATA + U_BOOT_DTB_DATA
+ second = U_BOOT_DATA + b'#' + VGA_DATA + U_BOOT_DTB_DATA
+ self.assertEqual(U_BOOT_IMG_DATA + first + second, data)
+
if __name__ == "__main__":
unittest.main()