public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 3/4] CI: Reuse getVars in repro-build-test
Date: Thu, 25 Jan 2024 11:06:16 +0200	[thread overview]
Message-ID: <20240125090617.2945621-4-amikan@ilbers.de> (raw)
In-Reply-To: <20240125090617.2945621-1-amikan@ilbers.de>

Avoid manual bitbake execution and variables parsing.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 testsuite/repro-build-test.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/testsuite/repro-build-test.py b/testsuite/repro-build-test.py
index 1c0b05ba..040a844e 100755
--- a/testsuite/repro-build-test.py
+++ b/testsuite/repro-build-test.py
@@ -29,13 +29,7 @@ class ReproBuild(CIBuilder):
 
     def get_image_path(self, target_name):
         image_dir = "tmp/deploy/images"
-        output = process.getoutput(
-            f'bitbake -e {target_name} '
-            r'| grep "^MACHINE=\|^IMAGE_FULLNAME="'
-        )
-        env = dict(d.split("=", 1) for d in output.splitlines())
-        machine = env["MACHINE"].strip("\"")
-        image_name = env["IMAGE_FULLNAME"].strip("\"")
+        machine, image_name = self.getVars("MACHINE", "IMAGE_FULLNAME", target=target_name)
         return f"{image_dir}/{machine}/{image_name}.tar.gz"
 
     def build_repro_image(
-- 
2.34.1


  parent reply	other threads:[~2024-01-25  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25  9:06 [PATCH 0/4] Improve variables obtaining in CI Anton Mikanovich
2024-01-25  9:06 ` [PATCH 1/4] CI: Fix getVars API self checks Anton Mikanovich
2024-01-25  9:06 ` [PATCH 2/4] CI: Remove getlayerdir API Anton Mikanovich
2024-01-25  9:06 ` Anton Mikanovich [this message]
2024-01-25  9:06 ` [PATCH 4/4] CI: Use getVars for vm output checking Anton Mikanovich
2024-01-31 14:41 ` [PATCH 0/4] Improve variables obtaining in CI Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240125090617.2945621-4-amikan@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox