summaryrefslogtreecommitdiffstats
path: root/scripts/patchtest-send-results
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2023-10-24 09:14:48 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-24 14:21:37 +0100
commite66dcd89b4738b98c6481838b5d3454bbbd411c5 (patch)
treeea5b4b7deafe1c5f1e3435dbbf0fac6df29d0fd9 /scripts/patchtest-send-results
parent3259f262c6579a703041d81569f33789a8f09c28 (diff)
downloadpoky-e66dcd89b4738b98c6481838b5d3454bbbd411c5.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: 98ca0b151517b3544454fd5c1656a2de631c4897) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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')