diff mbox series

[autobuilder,3/3] scripts/send-qa-email: add target and base revisions in regression report

Message ID 20230207141217.33892-4-alexis.lothore@bootlin.com
State New
Headers show
Series ease send-qa-email usage with older history | expand

Commit Message

Alexis Lothoré Feb. 7, 2023, 2:12 p.m. UTC
Current regression reports do not contain information about versions compared
when generating reports. While it is still possible to get the information by
searching the autobuilder log, it is not convenient. Moreover, future
developments will allow to generate multiple reports (with different bases for
comparison) in a single build.
As a consequence, embed target and base revisions in the report header

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Alexis Lothore <alexis.lothore@bootlin.com>
---
 scripts/send_qa_email.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
index b87e822..e2d7284 100755
--- a/scripts/send_qa_email.py
+++ b/scripts/send_qa_email.py
@@ -78,6 +78,10 @@  def generate_regression_report(resulttool, targetrepodir, basebranch, resultdir,
         fetch_testresults(resultdir, comparerevision)
         regreport = subprocess.check_output([resulttool, "regression-git", "-B", basebranch, "--commit", baserevision, "--commit2", comparerevision, resultdir])
         with open(outputdir + "/testresult-regressions-report.txt", "wb") as f:
+           f.write(str.encode("========================== Regression report ==============================\n"))
+           f.write(str.encode(f'{"=> Target:": <16}{basebranch: <16}({comparerevision})\n'))
+           f.write(str.encode(f'{"=> Base:": <16}{baseversion: <16}({baserevision})\n'))
+           f.write(str.encode("===========================================================================\n\n"))
            f.write(regreport)
     except subprocess.CalledProcessError as e:
         error = str(e)