summaryrefslogtreecommitdiffstats
path: root/scripts/patchtest-send-results
Commit message (Collapse)AuthorAgeFilesLines
* patchtest-send-results: add --debug optionTrevor Gamblin2024-02-161-6/+11
| | | | | | | | | | | Add a -d/--debug option to patchtest-send-results so that the contents of the constructed raw email can be checked without actually sending anything to the list or patch author. (From OE-Core rev: e50827d23fd3789e7a13df6918a06b198bbf4f95) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: use Message-ID directlyTrevor Gamblin2024-02-151-1/+3
| | | | | | | | | | | | | | There's no need to use regex for extracting the Message-ID field from the patch email and mangle it by removing the angle brackets in the process. Pull it directly from the mbox so that Patchtest's replies have even fewer differences when compared to other replies. Also add a TODO so that it's clear this needs adjustment when full series support is added. (From OE-Core rev: 1ce51580a23869a9c0f409446ff717d471fb60db) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: Add 'References' headerTrevor Gamblin2024-02-101-0/+5
| | | | | | | | | | | | | | | | | Based on https://www.rfc-editor.org/rfc/rfc2822#section-3.6.4, to get proper threading there should be a 'References' field defined in Patchtest's response headers if its replies are going to thread properly on Patchwork. This wasn't there before, hence why were were seeing the responses in the right place on the mailing list but not Patchwork. Since we only want Patchtest to reply directly to the tested patch, the 'References' field should only need to contain the same ID as the 'In-Reply-To' one. (From OE-Core rev: f8a2af973d829c3c7f2dce39ce452daf74f31f52) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: properly parse test statusAlexis Lothoré2024-02-061-1/+4
| | | | | | | | | | | | | | | | | | | | patchtest-send-results currently search the word "FAIL" in the whole testresults file to decide whether it should send a report to patch submitter or not. This global search can lead to false positives, for example if the commit subject contains the word "FAIL" (as observed in [1]) Prevent those false positives by explicitely parsing the test status from each line. Each test result line, generated by the patchtest script, is expected to have the following format: <STATUS>: <some info, depending on the status> [1] https://lore.kernel.org/openembedded-core/0101018d79bfe020-06f2ce89-ea19-456b-92e7-66ee1c710fd1-000000@us-west-2.amazonses.com/ (From OE-Core rev: 3567c21af8ed65448f9325ee3fe85b8be839e1b5) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: remove unused variableAlexis Lothoré2024-02-061-1/+0
| | | | | | | | | result_basename is declared but not used in the script (From OE-Core rev: c2ba125dc30fb1ef0bf96152863db22159f4b31c) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: fix sender parsingTrevor Gamblin2023-11-021-1/+1
| | | | | | | | | | | Not all mbox 'from' fields will contain angle brackets, so the re.findall invocation used for getting a reply_address may fail. Use a simpler reference to the field to get the sender's email address. (From OE-Core rev: 86e9afe09a346586114133f5a7470304d2ed733f) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: add In-Reply-ToTrevor Gamblin2023-11-011-18/+21
| | | | | | | | | | | Rework the script for sending results to use send_raw_email and specify the 'In-Reply-To' field so that patchtest replies to the emails, rather than sending them standalone to the submitter and mailing list. (From OE-Core rev: 0c45c92e7f26aea4edf2cfa577b7ba51384e59d3) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: send results to submitterTrevor Gamblin2023-10-301-6/+13
| | | | | | | | | | | | | Modify patchtest-send-results so that it extracts the submitter's email address and responds to them with the patch testresults. Also make a minor adjustment to the suggestions provided with each email and include a link to the Patchtest wiki page for additional clarification on specific failures. (From OE-Core rev: 64ed88e32cf9e04772319ff6e66c602d1cff4fd7) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: check max line length, simplify responsesTrevor Gamblin2023-10-251-8/+9
| | | | | | | | | | | | | | Check that the maximum line length of the testresult file is less than 220 characters, to help guard against malicious changes being sent in email responses. If any line exceeds this length, replace the normal testresults used in the response with a line stating that tests failed, but the results could not be processed. Also clean up the respone substrings slightly to go along with the change. (From OE-Core rev: b0d53cf587dc9afb97f00c1089e45b758e96dd7c) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest-send-results: improve subject lineTrevor Gamblin2023-10-241-1/+6
| | | | | | | | | | | 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>
* patchtest: update SPDX identifiersTrevor Gamblin2023-10-171-15/+2
| | | | | | | | | | Replace full license headers with SPDX identifiers and adjust all patchtest-related code to use GPL-2.0-only. (From OE-Core rev: 9bea6b39074296bb8d8719a3300636e316f19d1b) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchtest: add scripts to oe-coreTrevor Gamblin2023-10-171-0/+93
Add the following from the patchtest repo: - patchtest: core patch testing tool - patchtest-get-branch: determine the target branch of a patch - patchtest-get-series: pull patch series from Patchwork - patchtest-send-results: send test results to selected mailing list - patchtest-setup-sharedir: create sharedir for use with patchtest guest mode - patchtest.README: instructions for using patchtest based on the README in the original repository Note that the patchtest script was modified slightly from the repo version to retain compatibility with the oe-core changes. patchtest-send-results and patchtest-setup-sharedir are also primarily intended for automated testing in guest mode, but are added for consistency. (From OE-Core rev: cf318c3c05fc050b8c838c04f28797325c569c5c) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>