From a6123333aba1b587e39762da675a33bb0eb9ad94 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Thu, 22 Jul 2021 16:51:42 +0200 Subject: patman: add warning for invalid tag Add a error in patman tool when the commit message contents an invalid tag "Serie-.*" instead of "Series-.*". Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass --- tools/patman/func_test.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tools/patman/func_test.py') diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index 1ce6448d00b..9871bb580d0 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -506,6 +506,17 @@ Tested-by: %s 'Reviewed-by': {self.joe, self.mary}, 'Tested-by': {self.leb}}) + def testInvalidTag(self): + """Test invalid tag in a patchstream""" + text = '''This is a patch + +Serie-version: 2 +''' + with self.assertRaises(ValueError) as exc: + pstrm = PatchStream.process_text(text) + self.assertEqual("Line 3: Invalid tag = 'Serie-version: 2'", + str(exc.exception)) + def testMissingEnd(self): """Test a missing END tag""" text = '''This is a patch -- cgit v1.2.3