From 10fee88d42fe37d83f0a37b3dae69b674f8055f3 Mon Sep 17 00:00:00 2001 From: Neha Malcom Francis Date: Fri, 5 Jan 2024 17:09:17 +0530 Subject: tools: binman: ti_board_cfg: Check for linting problems Use yamllint for checking whether YAML configuration files are adhering to default yamllint rules. Signed-off-by: Neha Malcom Francis Suggested-by: Nishanth Menon --- tools/binman/ftest.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/binman/ftest.py') diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 90482518f1e..8a44bc051b3 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -7030,6 +7030,12 @@ fdt fdtmap Extract the devicetree blob from the fdtmap data = self._DoReadFile('293_ti_board_cfg.dts') self.assertEqual(TI_BOARD_CONFIG_DATA, data) + def testTIBoardConfigLint(self): + """Test that an incorrectly linted config file would generate error""" + with self.assertRaises(ValueError) as e: + data = self._DoReadFile('323_ti_board_cfg_phony.dts') + self.assertIn("Yamllint error", str(e.exception)) + def testTIBoardConfigCombined(self): """Test that a schema validated combined board config file can be generated""" data = self._DoReadFile('294_ti_board_cfg_combined.dts') -- cgit v1.2.3