diff mbox series

[yocto-autobuilder-helper,whinlatter] send_qa_email: Only copy logs when we are pushing tags

Message ID 20260211154643.3053476-2-yoann.congal@smile.fr
State New
Headers show
Series [yocto-autobuilder-helper,whinlatter] send_qa_email: Only copy logs when we are pushing tags | expand

Commit Message

Yoann Congal Feb. 11, 2026, 3:46 p.m. UTC
From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>

Resulttool creates tags in yocto-testresults and copies logs in an NFS
shared folder whose name is based on this tag. If we are never going to
push this tag, we should not copy the logs, in order to maintain some
coherency.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 904d5722ced282b58474e3b605ce87897994f4f7)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 scripts/send_qa_email.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
index d8c060f..6384001 100755
--- a/scripts/send_qa_email.py
+++ b/scripts/send_qa_email.py
@@ -190,7 +190,15 @@  def send_qa_email():
             utils.printheader("Storing results")
 
             if not args.dry_run:
-                subprocess.check_call([resulttool, "store", "--revision", revision, "-l", args.results_dir + "/../../testresult-logarchives" , args.results_dir, tempdir])
+                cmd = [resulttool, "store", "--revision", revision, args.results_dir, tempdir]
+
+                # Ask resulttool to store logs in log archive folder. We should
+                # also ask to push the tags before copying these logs, as tags
+                # and log folder names have to match.
+                if basebranch or targetbranch:
+                    cmd.extend(["-l", args.results_dir + "/../../testresult-logarchives", "-p"])
+
+                subprocess.check_call(cmd)
                 if basebranch:
                     subprocess.check_call(["git", "push", "--all", "--force"], cwd=tempdir)
                     subprocess.check_call(["git", "push", "--tags", "--force"], cwd=tempdir)