summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-22 21:43:56 -0600
committerSimon Glass <sjg@chromium.org>2023-08-02 12:05:57 -0600
commitaf41b24ebac86f25145f39f4eec4467d4c501bed (patch)
tree52998ca4575604cd2b58593e4fe0311106cb40d6 /tools/binman/ftest.py
parent589c2d9e514412aba4556d06ce3bdfb9c8800fa1 (diff)
binman: Remove templates after use
It is not necessary to keep templates around after they have been processed. They can cause confusion and potentially duplicate phandles. Remove them. Use the same means of detecting a template node in _ReadImageDesc so that the two places are consistent. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index b15f5acc7c0..ecada41833e 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -6871,6 +6871,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
vga = dtb.GetNode('/binman/first/intel-vga')
self.assertTrue(vga)
+ dtb_fname2 = tools.get_output_filename('u-boot.dtb.tmpl2')
+ self.assertTrue(os.path.exists(dtb_fname2))
+ dtb2 = fdt.Fdt.FromData(tools.read_file(dtb_fname2))
+ dtb2.Scan()
+ node2 = dtb2.GetNode('/binman/template')
+ self.assertFalse(node2)
+
def testTemplateBlobMulti(self):
"""Test using a template with 'multiple-images' enabled"""
TestFunctional._MakeInputFile('my-blob.bin', b'blob')