summaryrefslogtreecommitdiffstats
path: root/scripts/patchtest-send-results
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2023-10-24 09:14:48 -0400
committerSteve Sakoman <steve@sakoman.com>2023-11-24 05:01:37 -1000
commit174a6427558ed99aff53d71a58aaea56a349a0e1 (patch)
tree7924b92df1459d29df3a196ddade95a9fc9e26fd /scripts/patchtest-send-results
parent2a89e081caf7ea9095c411a99daf27254a8f9886 (diff)
downloadpoky-174a6427558ed99aff53d71a58aaea56a349a0e1.tar.gz
patchtest-send-results: improve subject line
Pull the actual email's subject line from the .mbox file and use that in patchtest's test results response, so that it's clearer which patch it is replying to. (From OE-Core rev: 86d00a1b5233250fbea32113ad9c43bd78778406) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 98ca0b151517b3544454fd5c1656a2de631c4897) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts/patchtest-send-results')
-rwxr-xr-xscripts/patchtest-send-results7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/patchtest-send-results b/scripts/patchtest-send-results
index 15ee5b077f..bb4604aeaf 100755
--- a/scripts/patchtest-send-results
+++ b/scripts/patchtest-send-results
@@ -53,7 +53,12 @@ with open(result_file, "r") as f:
53 testresult = f.read() 53 testresult = f.read()
54 54
55reply_contents = greeting + testresult + suggestions 55reply_contents = greeting + testresult + suggestions
56subject_line = f"Patchtest results for {result_basename}" 56
57# we know these patch files will only contain a single patch, so only
58# worry about the first element for getting the subject
59mbox = mailbox.mbox(args.patch)
60mbox_subject = mbox[0]['subject']
61subject_line = f"Patchtest results for {mbox_subject}"
57 62
58if "FAIL" in testresult: 63if "FAIL" in testresult:
59 ses_client = boto3.client('ses', region_name='us-west-2') 64 ses_client = boto3.client('ses', region_name='us-west-2')