From e752edcb6b22b2c42c8064d66a93f0910cac6fef Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 28 Aug 2014 09:43:35 -0600 Subject: 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 Signed-off-by: Simon Glass --- tools/patman/patchstream.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools/patman/patchstream.py') diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 00404681c42..322374c570c 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -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 -- cgit v1.2.3