From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 1/4] patman: Modify functional tests for new behavior
Date: Sun, 3 May 2020 17:55:30 -0400 [thread overview]
Message-ID: <20200503215533.360196-2-seanga2@gmail.com> (raw)
In-Reply-To: <20200503215533.360196-1-seanga2@gmail.com>
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 next several 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>
---
Changes in v3:
- New
tools/patman/func_test.py | 58 ++++++++++++++++---
.../0001-pci-Correct-cast-for-sandbox.patch | 3 +
...-for-sandbox-in-fdtdec_setup_mem_siz.patch | 12 +++-
tools/patman/test/test01.txt | 15 ++++-
4 files changed, 79 insertions(+), 9 deletions(-)
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 76319fff37..eedc7f5e18 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -85,19 +85,33 @@ class TestFunctional(unittest.TestCase):
Series-prefix: RFC
Series-cc: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
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
- Some changes
+ - Multi
+ line
+ change
+
+ Commit-changes: 2
+ - Changes only for this commit
+
+ Cover-changes: 4
+ - Some notes for the cover letter
Cover-letter:
test: A test patch series
This is a test of how the cover
- leter
+ letter
works
END
and this in the first commit:
+ Commit-changes: 2
+ - second revision change
+
Series-notes:
some notes
about some things
@@ -205,7 +219,7 @@ class TestFunctional(unittest.TestCase):
expected = '''
This is a test of how the cover
-leter
+letter
works
some notes
@@ -213,7 +227,11 @@ about some things
from the first commit
Changes in v4:
+- Multi
+ line
+ change
- Some changes
+- Some notes for the cover letter
Simon Glass (2):
pci: Correct cast for sandbox
@@ -240,8 +258,34 @@ Simon Glass (2):
subject = [line for line in lines if line.startswith('Subject')]
self.assertEqual('Subject: [RFC %d/%d]' % (i + 1, count),
subject[0][:18])
+
+ # Check that we got our commit notes
+ start = 0
+ expected = ''
+
if i == 0:
- # Check that we got our commit notes
- self.assertEqual('---', lines[17])
- self.assertEqual('Some notes about', lines[18])
- self.assertEqual('the first commit', lines[19])
+ 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))])
diff --git a/tools/patman/test/0001-pci-Correct-cast-for-sandbox.patch b/tools/patman/test/0001-pci-Correct-cast-for-sandbox.patch
index 7191176f75..038943c2c9 100644
--- a/tools/patman/test/0001-pci-Correct-cast-for-sandbox.patch
+++ b/tools/patman/test/0001-pci-Correct-cast-for-sandbox.patch
@@ -15,6 +15,9 @@ cmd/pci.c:152:11: warning: format ?%llx? expects argument of type
Fix it with a cast.
Signed-off-by: Simon Glass <sjg@chromium.org>
+Commit-changes: 2
+- Changes only for this commit
+
Series-notes:
some notes
about some things
diff --git a/tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch b/tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch
index 702c0306ff..56278a6ce9 100644
--- a/tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch
+++ b/tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch
@@ -21,13 +21,23 @@ Series-cc: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
Cover-letter-cc: Lord M?lchett <clergy@palace.gov>
Series-version: 3
Patch-cc: fred
+Series-process-log: sort, uniq
Series-changes: 4
- Some changes
+- Multi
+ line
+ change
+
+Commit-changes: 2
+- Changes only for this commit
+
+Cover-changes: 4
+- Some notes for the cover letter
Cover-letter:
test: A test patch series
This is a test of how the cover
-leter
+letter
works
END
---
diff --git a/tools/patman/test/test01.txt b/tools/patman/test/test01.txt
index 478ea93674..b238a8b4ba 100644
--- a/tools/patman/test/test01.txt
+++ b/tools/patman/test/test01.txt
@@ -13,6 +13,9 @@ Date: Sat Apr 15 15:39:08 2017 -0600
Fix it with a cast.
Signed-off-by: Simon Glass <sjg@chromium.org>
+ Commit-changes: 2
+ - second revision change
+
Series-notes:
some notes
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>
Series-version: 3
Patch-cc: fred
+ Series-process-log: sort, uniq
Series-changes: 4
- Some changes
+ - Multi
+ line
+ change
+
+ Commit-changes: 2
+ - Changes only for this commit
+
+ Cover-changes: 4
+ - Some notes for the cover letter
Cover-letter:
test: A test patch series
This is a test of how the cover
- leter
+ letter
works
END
--
2.26.2
next prev parent reply other threads:[~2020-05-03 21:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-03 21:55 [PATCH v3 0/4] patman: Add changelog customization options Sean Anderson
2020-05-03 21:55 ` Sean Anderson [this message]
2020-05-04 14:17 ` [PATCH v3 1/4] patman: Modify functional tests for new behavior Simon Glass
2020-05-03 21:55 ` [PATCH v3 2/4] patman: Suppress empty changelog entries Sean Anderson
2020-05-04 14:39 ` Simon Glass
2020-05-04 16:59 ` Sean Anderson
2020-05-04 19:26 ` Simon Glass
2020-05-03 21:55 ` [PATCH v3 3/4] patman: Add new tags for finer-grained changelog control Sean Anderson
2020-05-04 14:39 ` Simon Glass
2020-05-03 21:55 ` [PATCH v3 4/4] patman: Support multi-line changes in changelogs Sean Anderson
2020-05-04 14:39 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200503215533.360196-2-seanga2@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox