summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2022-08-19 16:25:23 +0200
committerSimon Glass <sjg@chromium.org>2022-08-20 18:07:33 -0600
commitfa24f5578cc0a2dc3afe8ce0c7b53b2d4408434c (patch)
tree677678de3bd9918b8ec974c76c9dc9dc18488acc
parent917b3c37ae10cc2a965cfc7d7eb701e5f0b75c39 (diff)
binman: Check only section data in multi section test
Check only section data instead of the rest of the image in multi section test. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/binman/ftest.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index a2b59208d41..9bce102e77b 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -4427,15 +4427,17 @@ class TestFunctional(unittest.TestCase):
rest = base[len(U_BOOT_DATA):]
# Check compressed data
- section1 = self._decompress(rest)
expect1 = comp_util.compress(COMPRESS_DATA + U_BOOT_DATA, 'lz4')
- self.assertEquals(expect1, rest[:len(expect1)])
+ data1 = rest[:len(expect1)]
+ section1 = self._decompress(data1)
+ self.assertEquals(expect1, data1)
self.assertEquals(COMPRESS_DATA + U_BOOT_DATA, section1)
rest1 = rest[len(expect1):]
- section2 = self._decompress(rest1)
expect2 = comp_util.compress(COMPRESS_DATA + COMPRESS_DATA, 'lz4')
- self.assertEquals(expect2, rest1[:len(expect2)])
+ data2 = rest1[:len(expect2)]
+ section2 = self._decompress(data2)
+ self.assertEquals(expect2, data2)
self.assertEquals(COMPRESS_DATA + COMPRESS_DATA, section2)
rest2 = rest1[len(expect2):]