binman: Add a way to check for missing properties

Some new entries are likely to have required properties. Support this in a
standard way, with a list of required properties which can be set up by
base classes. Check for missing properties when the entry is read.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-08-20 18:07:32 -06:00
parent 24474dc20a
commit cdadadab7d
3 changed files with 22 additions and 3 deletions
+1 -1
View File
@@ -1693,7 +1693,7 @@ class TestFunctional(unittest.TestCase):
"""Test for an fill entry type with no size"""
with self.assertRaises(ValueError) as e:
self._DoReadFile('070_fill_no_size.dts')
self.assertIn("'fill' entry must have a size property",
self.assertIn("'fill' entry is missing properties: size",
str(e.exception))
def _HandleGbbCommand(self, pipe_list):