1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-02 01:02:19 +02:00

patman: Correct unit tests to run correctly

It seems that doctest behaves differently now, and some of the unit tests
do not run. Adjust the tests to work correctly.

 ./tools/patman/patman --test
<unittest.result.TestResult run=10 errors=0 failures=0>

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2014-08-28 09:43:35 -06:00
parent 6ba5737ff0
commit e752edcb6b
4 changed files with 22 additions and 14 deletions

View File

@@ -275,7 +275,7 @@ class PatchStream:
# Suppress duplicate signoffs
elif signoff_match:
if (self.is_log or
if (self.is_log or not self.commit or
self.commit.CheckDuplicateSignoff(signoff_match.group(1))):
out = [line]
@@ -312,7 +312,10 @@ class PatchStream:
out = []
log = self.series.MakeChangeLog(self.commit)
out += self.FormatTags(self.tags)
out += [line] + self.commit.notes + [''] + log
out += [line]
if self.commit:
out += self.commit.notes
out += [''] + log
elif self.found_test:
if not re_allowed_after_test.match(line):
self.lines_after_test += 1