summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 1a92a99b511..92df2a03650 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -4613,6 +4613,8 @@ class TestFunctional(unittest.TestCase):
dtb.Scan()
props = self._GetPropTree(dtb, ['offset', 'image-pos', 'size',
'uncomp-size'])
+ data = data[:0x30]
+ data = data.rstrip(b'\xff')
orig = self._decompress(data)
self.assertEqual(COMPRESS_DATA + U_BOOT_DATA, orig)
expected = {
@@ -6218,8 +6220,9 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testCompUtilPadding(self):
"""Test padding of compression algorithms"""
- # Skip zstd because it doesn't support padding
- for bintool in [v for k,v in self.comp_bintools.items() if k != 'zstd']:
+ # Skip zstd and lz4 because they doesn't support padding
+ for bintool in [v for k,v in self.comp_bintools.items()
+ if not k in ['zstd', 'lz4']]:
self._CheckBintool(bintool)
data = bintool.compress(COMPRESS_DATA)
self.assertNotEqual(COMPRESS_DATA, data)
@@ -7990,5 +7993,12 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
"""Test an image with an FIT with multiple FDT images using NAME"""
self.CheckFitFdt('345_fit_fdt_name.dts', use_seq_num=False)
+ def testRemoveTemplate(self):
+ """Test whether template is removed"""
+ TestFunctional._MakeInputFile('my-blob.bin', b'blob')
+ TestFunctional._MakeInputFile('my-blob2.bin', b'other')
+ self._DoTestFile('346_remove_template.dts',
+ force_missing_bintools='openssl',)
+
if __name__ == "__main__":
unittest.main()