From 6a0b5f8b9caa0c8e3a39ed8c979cfdbbf66b1841 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 8 Feb 2022 11:50:03 -0700 Subject: binman: Allow different operations in FIT generator nodes At present we only support expanding out FDT nodes. Make the operation into an @operation property, so that others can be supported. Re-arrange and tidy up the documentation so that it has separate headings for each topic. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tools/binman/ftest.py') diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 6a77f1da1ee..8f00db69455 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -5303,6 +5303,24 @@ fdt fdtmap Extract the devicetree blob from the fdtmap data = self._DoReadFile('222_tee_os.dts') self.assertEqual(TEE_OS_DATA, data[:len(TEE_OS_DATA)]) + def testFitFdtOper(self): + """Check handling of a specified FIT operation""" + entry_args = { + 'of-list': 'test-fdt1 test-fdt2', + 'default-dt': 'test-fdt2', + } + self._DoReadFileDtb( + '223_fit_fdt_oper.dts', + entry_args=entry_args, + extra_indirs=[os.path.join(self._indir, TEST_FDT_SUBDIR)])[0] + + def testFitFdtBadOper(self): + """Check handling of an FDT map when the section cannot be found""" + with self.assertRaises(ValueError) as exc: + self._DoReadFileDtb('224_fit_bad_oper.dts') + self.assertIn("Node '/binman/fit': Unknown operation 'unknown'", + str(exc.exception)) + if __name__ == "__main__": unittest.main() -- cgit v1.2.3