1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-30 06:51:28 +02:00

patman: Modify functional tests for new behavior

This patch adds or modifies functional tests for the Cover-changes,
Commit-changes, and Series-process-log tags in order to account for new
behavior added in the previous few patches. The '(no changes since v1)'
case is not tested for, since that would need an additional commit to test
in addition to testing the existing code paths.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Sean Anderson
2020-05-04 16:28:36 -04:00
committed by Simon Glass
parent 0411fff36f
commit dc03ba48be
4 changed files with 79 additions and 9 deletions

View File

@@ -82,19 +82,33 @@ class TestFunctional(unittest.TestCase):
Series-prefix: RFC Series-prefix: RFC
Series-cc: Stefan Brüns <stefan.bruens@rwth-aachen.de> Series-cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Cover-letter-cc: Lord Mëlchett <clergy@palace.gov> Cover-letter-cc: Lord Mëlchett <clergy@palace.gov>
Series-version: 2 Series-version: 3
Patch-cc: fred
Series-process-log: sort, uniq
Series-changes: 4 Series-changes: 4
- Some changes - Some changes
- Multi
line
change
Commit-changes: 2
- Changes only for this commit
Cover-changes: 4
- Some notes for the cover letter
Cover-letter: Cover-letter:
test: A test patch series test: A test patch series
This is a test of how the cover This is a test of how the cover
leter letter
works works
END END
and this in the first commit: and this in the first commit:
Commit-changes: 2
- second revision change
Series-notes: Series-notes:
some notes some notes
about some things about some things
@@ -202,7 +216,7 @@ class TestFunctional(unittest.TestCase):
expected = ''' expected = '''
This is a test of how the cover This is a test of how the cover
leter letter
works works
some notes some notes
@@ -210,7 +224,11 @@ about some things
from the first commit from the first commit
Changes in v4: Changes in v4:
- Multi
line
change
- Some changes - Some changes
- Some notes for the cover letter
Simon Glass (2): Simon Glass (2):
pci: Correct cast for sandbox pci: Correct cast for sandbox
@@ -237,8 +255,34 @@ Simon Glass (2):
subject = [line for line in lines if line.startswith('Subject')] subject = [line for line in lines if line.startswith('Subject')]
self.assertEqual('Subject: [RFC %d/%d]' % (i + 1, count), self.assertEqual('Subject: [RFC %d/%d]' % (i + 1, count),
subject[0][:18]) subject[0][:18])
if i == 0:
# Check that we got our commit notes # Check that we got our commit notes
self.assertEqual('---', lines[17]) start = 0
self.assertEqual('Some notes about', lines[18]) expected = ''
self.assertEqual('the first commit', lines[19])
if i == 0:
start = 17
expected = '''---
Some notes about
the first commit
(no changes since v2)
Changes in v2:
- second revision change'''
elif i == 1:
start = 17
expected = '''---
Changes in v4:
- Multi
line
change
- Some changes
Changes in v2:
- Changes only for this commit'''
if expected:
expected = expected.splitlines()
self.assertEqual(expected, lines[start:(start+len(expected))])

View File

@@ -15,6 +15,9 @@ cmd/pci.c:152:11: warning: format %llx expects argument of type
Fix it with a cast. Fix it with a cast.
Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Commit-changes: 2
- Changes only for this commit
Series-notes: Series-notes:
some notes some notes
about some things about some things

View File

@@ -21,13 +21,23 @@ Series-cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Cover-letter-cc: Lord Mëlchett <clergy@palace.gov> Cover-letter-cc: Lord Mëlchett <clergy@palace.gov>
Series-version: 3 Series-version: 3
Patch-cc: fred Patch-cc: fred
Series-process-log: sort, uniq
Series-changes: 4 Series-changes: 4
- Some changes - Some changes
- Multi
line
change
Commit-changes: 2
- Changes only for this commit
Cover-changes: 4
- Some notes for the cover letter
Cover-letter: Cover-letter:
test: A test patch series test: A test patch series
This is a test of how the cover This is a test of how the cover
leter letter
works works
END END
--- ---

View File

@@ -13,6 +13,9 @@ Date: Sat Apr 15 15:39:08 2017 -0600
Fix it with a cast. Fix it with a cast.
Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Commit-changes: 2
- second revision change
Series-notes: Series-notes:
some notes some notes
about some things about some things
@@ -45,12 +48,22 @@ Date: Sat Apr 15 15:39:08 2017 -0600
Cover-letter-cc: Lord Mëlchett <clergy@palace.gov> Cover-letter-cc: Lord Mëlchett <clergy@palace.gov>
Series-version: 3 Series-version: 3
Patch-cc: fred Patch-cc: fred
Series-process-log: sort, uniq
Series-changes: 4 Series-changes: 4
- Some changes - Some changes
- Multi
line
change
Commit-changes: 2
- Changes only for this commit
Cover-changes: 4
- Some notes for the cover letter
Cover-letter: Cover-letter:
test: A test patch series test: A test patch series
This is a test of how the cover This is a test of how the cover
leter letter
works works
END END