diff mbox series

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

Message ID 20230207152949.43487-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, 3:29 p.m. UTC
From: Alexis Lothoré <alexis.lothore@bootlin.com>

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>
 scripts/send_qa_email.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series


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"))
     except subprocess.CalledProcessError as e:
         error = str(e)