aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/func_test.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-08-09 09:27:06 -0400
committerTom Rini <trini@konsulko.com>2021-08-09 09:27:06 -0400
commit0dec2030ccc686eae4616d1ce57d41eaed15685e (patch)
tree5e9a34e4d51c4587a2138a2de969361ad3ec1f2c /tools/patman/func_test.py
parent3823315cbedf930c52fe77452063ab6d62b157be (diff)
parente679f39f7fc3eb083b2f957d748f81bbdc28f28c (diff)
Merge tag 'dm-pull-8aug21' of https://source.denx.de/u-boot/custodians/u-boot-dm
Use log subsystem for dm_warn() Various minor bug fixes
Diffstat (limited to 'tools/patman/func_test.py')
-rw-r--r--tools/patman/func_test.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 9871bb580d..2493e527f5 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -136,7 +136,7 @@ class TestFunctional(unittest.TestCase):
Commit-changes: 2
- Changes only for this commit
- Cover-changes: 4
+' Cover-changes: 4
- Some notes for the cover letter
Cover-letter:
@@ -1293,3 +1293,24 @@ Reviewed-by: %s
self.assertEqual(terminal.PrintLine(
'4 new responses available in patchwork (use -d to write them to a new branch)',
None), next(lines))
+
+ def testInsertTags(self):
+ """Test inserting of review tags"""
+ msg = '''first line
+second line.'''
+ tags = [
+ 'Reviewed-by: Bin Meng <bmeng.cn@gmail.com>',
+ 'Tested-by: Bin Meng <bmeng.cn@gmail.com>'
+ ]
+ signoff = 'Signed-off-by: Simon Glass <sjg@chromium.com>'
+ tag_str = '\n'.join(tags)
+
+ new_msg = patchstream.insert_tags(msg, tags)
+ self.assertEqual(msg + '\n\n' + tag_str, new_msg)
+
+ new_msg = patchstream.insert_tags(msg + '\n', tags)
+ self.assertEqual(msg + '\n\n' + tag_str, new_msg)
+
+ msg += '\n\n' + signoff
+ new_msg = patchstream.insert_tags(msg, tags)
+ self.assertEqual(msg + '\n' + tag_str, new_msg)