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 <n-francis@ti.com>
Suggested-by: Nishanth Menon <nm@ti.com>
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 9048251..8a44bc0 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -7030,6 +7030,12 @@
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')