@@ -123,14 +123,14 @@ class TestMbox(base.Base):
if base_path in project.paths:
self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists',
data=[('Suggested ML', '%s [%s]' % (project.listemail, project.gitrepo)),
- ('Patch\'s path:', patch.path)])
+ ('Patch\'s path', patch.path)])
# check for poky's scripts code
if base_path.startswith('scripts'):
for poky_file in self.poky_scripts:
if patch.path.startswith(poky_file):
self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists',
- data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)])
+ data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path', patch.path)])
def test_mbox_format(self):
if self.unidiff_parse_error:
@@ -89,8 +89,11 @@ def getResult(patch, mergepatch, logfile=None):
def addFailure(self, test, err):
self.test_failure = True
desc = _format_test_description(test)
- issue = json.loads(str(err[1]))["issue"]
+ parsed = json.loads(str(err[1]))
+ issue = parsed["issue"]
_write_patchtest_result('{}: {}: {} ({})'.format(self.fail, desc, issue, test.id()), logfile)
+ for key, val in parsed.get('data') or []:
+ _write_patchtest_result(' {}: {}'.format(key, val), logfile)
def addSuccess(self, test):
desc = _format_test_description(test)
Print the data passed with each failure, such as the suggested mailing list from test_target_mailing_list, along with the test result. addFailure() adds ': ' after each key, so drop the trailing colon from the "Patch's path" key in test_mbox.py to avoid doubling it. AI-Generated: Uses Claude Code Opus 5.5 Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> --- meta/lib/patchtest/tests/test_mbox.py | 4 ++-- scripts/patchtest | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-)