summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorNeha Malcom Francis <n-francis@ti.com>2022-10-17 16:36:25 +0530
committerSimon Glass <sjg@chromium.org>2022-10-29 07:36:33 -0600
commit3545e8595c944c893bc3fa64c8e4727c928cf892 (patch)
tree84e023add2df4f8b3d276bd5f95d251896de13e2 /tools/binman/ftest.py
parentf29f98d1e40e6b4d9c723af503b20948aa482bf2 (diff)
binman: Add support for symlinking images
Adding support to symlink an image packaged using binman. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 261107b3354..232ac2cf185 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -5995,6 +5995,15 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
self.assertIn('Expected __bss_size symbol in vpl/u-boot-vpl',
str(e.exception))
+ def testSymlink(self):
+ """Test that image files can be named"""
+ retcode = self._DoTestFile('259_symlink.dts', debug=True, map=True)
+ self.assertEqual(0, retcode)
+ image = control.images['test_image']
+ fname = tools.get_output_filename('test_image.bin')
+ sname = tools.get_output_filename('symlink_to_test.bin')
+ self.assertTrue(os.path.islink(sname))
+ self.assertEqual(os.readlink(sname), fname)
if __name__ == "__main__":
unittest.main()