Commit 1f487f85d2d2a78a8d4e533253ed5c853540aea1
1 parent
2eb5fc13b3
Exists in
smarc_8mq_lf_v2020.04
and in
18 other branches
patman: Add a maintainer test feature to MakeCcFile()
Allow the add_maintainers parameter to be a list of maintainers, thus allowing us to simulate calling the script in tests without actually needing it to work. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff
tools/patman/series.py
... | ... | @@ -212,7 +212,9 @@ |
212 | 212 | cover_fname: If non-None the name of the cover letter. |
213 | 213 | raise_on_error: True to raise an error when an alias fails to match, |
214 | 214 | False to just print a message. |
215 | - add_maintainers: Call the get_maintainers to CC maintainers | |
215 | + add_maintainers: Either: | |
216 | + True/False to call the get_maintainers to CC maintainers | |
217 | + List of maintainers to include (for testing) | |
216 | 218 | Return: |
217 | 219 | Filename of temp file created |
218 | 220 | """ |
... | ... | @@ -227,7 +229,9 @@ |
227 | 229 | raise_on_error=raise_on_error) |
228 | 230 | list += gitutil.BuildEmailList(commit.cc_list, |
229 | 231 | raise_on_error=raise_on_error) |
230 | - if add_maintainers: | |
232 | + if type(add_maintainers) == type(list): | |
233 | + list += add_maintainers | |
234 | + elif add_maintainers: | |
231 | 235 | list += get_maintainer.GetMaintainer(commit.patch) |
232 | 236 | list = [m.encode('utf-8') if type(m) != str else m for m in list] |
233 | 237 | all_ccs += list |