diff mbox series

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

Message ID 20260108-mathieu-fix-15696-v2-1-11e36594faef@bootlin.com
State New
Headers show
Series [yocto-autobuilder-helper,v2] send_qa_email: Only copy logs when we are pushing tags | expand

Commit Message

Mathieu Dubois-Briand Jan. 8, 2026, 2:46 p.m. UTC
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>
---
Changes in v2:
- Add -p parameter to explicitly ask for tags pushing.
- Link to v1: https://lore.kernel.org/r/20251230-mathieu-fix-15696-v1-1-a364776c47b5@bootlin.com
---
 scripts/send_qa_email.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)


---
base-commit: 6f793956c9b43f7a74f5a22c86a93b744b21ada9
change-id: 20251230-mathieu-fix-15696-788af5e206c5

Best regards,
diff mbox series

Patch

diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
index 23114a47da11..91f175c64987 100755
--- a/scripts/send_qa_email.py
+++ b/scripts/send_qa_email.py
@@ -203,7 +203,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)