From c3665a896e30578f8e5d6f1927da304efcd14735 Mon Sep 17 00:00:00 2001 From: Stefan Herbrechtsmeier Date: Fri, 19 Aug 2022 16:25:31 +0200 Subject: binman: Support missing compression tools Handle missing compression tools by returning empty data and record missing bintool. Signed-off-by: Stefan Herbrechtsmeier Reviewed-by: Simon Glass --- tools/binman/ftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/binman/ftest.py') diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 4be84f6e17f..81ecc8829f9 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -4422,6 +4422,15 @@ class TestFunctional(unittest.TestCase): } self.assertEqual(expected, props) + def testLz4Missing(self): + """Test that binman still produces an image if lz4 is missing""" + with test_util.capture_sys_output() as (_, stderr): + self._DoTestFile('185_compress_section.dts', + force_missing_bintools='lz4') + err = stderr.getvalue() + self.assertRegex(err, + "Image 'main-section'.*missing bintools.*: lz4") + def testCompressExtra(self): """Test compression of a section with no fixed size""" self._CheckLz4() -- cgit v1.2.3