1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 19:05:51 +01:00

patman: Decode output from the '--show-types' option

Collect the 'checkpatch type' from each error, warning and check. Provide
this to patman and update the uclass test to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-06-14 10:54:06 -06:00
parent 4148c20f53
commit 89fb8b75bc
2 changed files with 17 additions and 11 deletions

View File

@@ -82,7 +82,7 @@ Signed-off-by: Simon Glass <sjg@chromium.org>
return inname
def run_checkpatch(self):
return checkpatch.CheckPatch(self.get_patch())
return checkpatch.CheckPatch(self.get_patch(), show_types=True)
class TestPatch(unittest.TestCase):
@@ -355,7 +355,7 @@ index 0000000..2234c87
result = pm.run_checkpatch()
self.assertEqual(result.warnings, 1)
self.assertEqual(len(result.problems), 1)
self.assertIn('Possible new uclass', result.problems[0]['msg'])
self.assertIn('NEW_UCLASS', result.problems[0]['cptype'])
if __name__ == "__main__":