diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-10-12 23:06:24 -0400 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-11-02 09:38:54 -0600 |
commit | a13af89e10391189b87ad32616ba688d6d7c5878 (patch) | |
tree | b67ecf74165f225cd80d5cae5a0da9f2f4c586d4 /tools/patman/test_checkpatch.py | |
parent | 07fe79c93c5caba181f37844ca95fbda4db3f613 (diff) |
patman: Add a 'keep_change_id' setting
A Change-Id can be useful for traceability purposes, and some projects
may wish to have them preserved. This change makes it configurable
via a new 'keep_change_id' setting.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/test_checkpatch.py')
-rw-r--r-- | tools/patman/test_checkpatch.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/patman/test_checkpatch.py b/tools/patman/test_checkpatch.py index 0a8f7408f14..db7860f551d 100644 --- a/tools/patman/test_checkpatch.py +++ b/tools/patman/test_checkpatch.py @@ -209,6 +209,22 @@ Signed-off-by: Simon Glass <sjg@chromium.org> rc = os.system('diff -u %s %s' % (inname, expname)) self.assertEqual(rc, 0) + os.remove(inname) + + # Test whether the keep_change_id settings works. + inhandle, inname = tempfile.mkstemp() + infd = os.fdopen(inhandle, 'w', encoding='utf-8') + infd.write(data) + infd.close() + + patchstream.fix_patch(None, inname, series.Series(), com, + keep_change_id=True) + + with open(inname, 'r') as f: + content = f.read() + self.assertIn( + 'Change-Id: I80fe1d0c0b7dd10aa58ce5bb1d9290b6664d5413', + content) os.remove(inname) os.remove(expname) |