mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 09:42:22 +02:00
binman: Support help messages for missing blobs
When an external blob is missing it can be quite confusing for the user. Add a way to provide a help message that is shown. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
@@ -3561,7 +3561,7 @@ class TestFunctional(unittest.TestCase):
|
||||
self._DoTestFile('168_fit_missing_blob.dts',
|
||||
allow_missing=True)
|
||||
err = stderr.getvalue()
|
||||
self.assertRegex(err, "Image 'main-section'.*missing.*: blob-ext")
|
||||
self.assertRegex(err, "Image 'main-section'.*missing.*: atf-bl31")
|
||||
|
||||
def testBlobNamedByArgMissing(self):
|
||||
"""Test handling of a missing entry arg"""
|
||||
@@ -3692,5 +3692,21 @@ class TestFunctional(unittest.TestCase):
|
||||
self.assertIn("default-dt entry argument 'test-fdt3' not found in fdt list: test-fdt1, test-fdt2",
|
||||
str(e.exception))
|
||||
|
||||
def testFitExtblobMissingHelp(self):
|
||||
"""Test display of help messages when an external blob is missing"""
|
||||
control.missing_blob_help = control._ReadMissingBlobHelp()
|
||||
control.missing_blob_help['wibble'] = 'Wibble test'
|
||||
control.missing_blob_help['another'] = 'Another test'
|
||||
with test_util.capture_sys_output() as (stdout, stderr):
|
||||
self._DoTestFile('168_fit_missing_blob.dts',
|
||||
allow_missing=True)
|
||||
err = stderr.getvalue()
|
||||
|
||||
# We can get the tag from the name, the type or the missing-msg
|
||||
# property. Check all three.
|
||||
self.assertIn('You may need to build ARM Trusted', err)
|
||||
self.assertIn('Wibble test', err)
|
||||
self.assertIn('Another test', err)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Reference in New Issue
Block a user