summaryrefslogtreecommitdiff
path: root/tools/patman/patchstream.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/patman/patchstream.py')
-rw-r--r--tools/patman/patchstream.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index 6098728aa1..1b9136aa5c 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -424,6 +424,19 @@ def GetMetaData(start, count):
"""
return GetMetaDataForList('HEAD~%d' % start, None, count)
+def GetMetaDataForTest(text):
+ """Process metadata from a file containing a git log. Used for tests
+
+ Args:
+ text:
+ """
+ series = Series()
+ ps = PatchStream(series, is_log=True)
+ for line in text.splitlines():
+ ps.ProcessLine(line)
+ ps.Finalize()
+ return series
+
def FixPatch(backup_dir, fname, series, commit):
"""Fix up a patch file, by adding/removing as required.