aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/func_test.py
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2021-07-22 16:51:42 +0200
committerSimon Glass <sjg@chromium.org>2021-08-01 09:05:24 -0600
commita6123333aba1b587e39762da675a33bb0eb9ad94 (patch)
tree92eefc0b1cd2faa1c159e6b21a95aff9cb7c9eff /tools/patman/func_test.py
parentb29a0dbdc3de43a8574335bef93d50c659eff2e5 (diff)
downloadu-boot-a6123333aba1b587e39762da675a33bb0eb9ad94.zip
u-boot-a6123333aba1b587e39762da675a33bb0eb9ad94.tar.gz
u-boot-a6123333aba1b587e39762da675a33bb0eb9ad94.tar.bz2
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 <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/func_test.py')
-rw-r--r--tools/patman/func_test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 1ce6448..9871bb5 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