mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
patman: Add a functional test
The existing test (patman --test) only covers basic checkpatch output. We have had some problems with unicode processing and could use test coverage for the various tags patman supports. Add a new functional test which runs most of the patman flow on a few test commits and checks that the results are correct. See the documentation in the test for a description of what it does. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user