From: Henning Schild <henning.schild@siemens.com>
To: venkata.pyla@toshiba-tsip.com
Cc: isar-users@googlegroups.com, amikan@ilbers.de,
jan.kiszka@siemens.com, kazuhiro3.hayashi@toshiba.co.jp,
dinesh.kumar@toshiba-tsip.com
Subject: Re: [PATCH] repro-build-test.py: Use bitbake env to get image filename
Date: Tue, 10 Jan 2023 14:00:24 +0100 [thread overview]
Message-ID: <20230110140024.204285a9@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20230109155257.26183-1-venkata.pyla@toshiba-tsip.com>
Am Mon, 9 Jan 2023 21:22:57 +0530
schrieb venkata.pyla@toshiba-tsip.com:
> From: venkata pyla <venkata.pyla@toshiba-tsip.com>
>
> The hard-coded distro name 'debian' will break the test when other
> distros are used.
>
> So the image_name is prepared using bitbake environment variables.
>
> Signed-off-by: venkata pyla <venkata.pyla@toshiba-tsip.com>
> ---
> testsuite/repro-build-test.py | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/testsuite/repro-build-test.py
> b/testsuite/repro-build-test.py index 5d92e2c..1c0b05b 100755
> --- a/testsuite/repro-build-test.py
> +++ b/testsuite/repro-build-test.py
> @@ -29,11 +29,14 @@ class ReproBuild(CIBuilder):
>
> def get_image_path(self, target_name):
> image_dir = "tmp/deploy/images"
> - target_params = target_name.split(":")
> - machine = target_params[1].split("-")[0]
> - distro = "debian-" + target_params[1].split("-")[1]
> - image_type = target_params[2]
> - return
> f"{image_dir}/{machine}/{image_type}-{distro}-{machine}.tar.gz"
> + output = process.getoutput(
> + f'bitbake -e {target_name} '
> + r'| grep "^MACHINE=\|^IMAGE_FULLNAME="'
> + )
there is start_vm.get_bitbake_var, maybe you can use that. And we could
think about moving that to another place, because it has little to do
with "start_vm".
Henning
> + env = dict(d.split("=", 1) for d in output.splitlines())
> + machine = env["MACHINE"].strip("\"")
> + image_name = env["IMAGE_FULLNAME"].strip("\"")
> + return f"{image_dir}/{machine}/{image_name}.tar.gz"
>
> def build_repro_image(
> self, target, source_date_epoch=None,
> image_name="image.tar.gz"
next prev parent reply other threads:[~2023-01-10 13:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 15:52 venkata.pyla
2023-01-10 13:00 ` Henning Schild [this message]
2023-03-30 7:14 ` 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=20230110140024.204285a9@md1za8fc.ad001.siemens.net \
--to=henning.schild@siemens.com \
--cc=amikan@ilbers.de \
--cc=dinesh.kumar@toshiba-tsip.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=kazuhiro3.hayashi@toshiba.co.jp \
--cc=venkata.pyla@toshiba-tsip.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