From: Anton Mikanovich <amikan@ilbers.de>
To: Felix Moessbauer <felix.moessbauer@siemens.com>,
isar-users@googlegroups.com
Cc: henning.schild@siemens.com, jan.kiszka@siemens.com,
ibr@ilbers.de, adriaan.schmidt@siemens.com
Subject: Re: [PATCH v6 5/6] add test for wic partition deploy logic
Date: Tue, 27 Sep 2022 10:00:16 +0300 [thread overview]
Message-ID: <a3e8a9ca-7ad5-6cb1-ea72-1b59d71c8086@ilbers.de> (raw)
In-Reply-To: <20220921073348.169965-6-felix.moessbauer@siemens.com>
21.09.2022 10:33, Felix Moessbauer wrote:
> This patch adds tests to check if the wic partition files
> are copied to the deploydir if requested.
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> testsuite/cibase.py | 10 ++++++++++
> testsuite/cibuilder.py | 5 ++++-
> testsuite/citest.py | 23 +++++++++++++++++++++++
> 3 files changed, 37 insertions(+), 1 deletion(-)
>
> diff --git a/testsuite/cibase.py b/testsuite/cibase.py
> index 722d7bd2..6239b4de 100755
> --- a/testsuite/cibase.py
> +++ b/testsuite/cibase.py
> @@ -17,6 +17,16 @@ class CIBaseTest(CIBuilder):
>
> self.bitbake(targets, **kwargs)
>
> + def perform_wic_partition_test(self, targets, wic_deploy_parts, **kwargs):
> + self.configure(wic_deploy_parts=wic_deploy_parts, **kwargs)
> + self.bitbake(targets, **kwargs)
> +
> + partition_files = set(glob.glob(f'{self.build_dir}/tmp/deploy/images/*/*.wic.p1'))
> + if wic_deploy_parts and len(partition_files) == 0:
> + self.fail('Found raw wic partitions in DEPLOY_DIR')
> + if not wic_deploy_parts and len(partition_files) != 0:
> + self.fail('Did not find raw wic partitions in DEPLOY_DIR')
> +
> def perform_repro_test(self, targets, signed=False, **kwargs):
> gpg_pub_key = os.path.dirname(__file__) + '/keys/base-apt/test_pub.key'
> gpg_priv_key = os.path.dirname(__file__) + '/keys/base-apt/test_priv.key'
> diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
> index dfb0a376..d5c83b22 100755
> --- a/testsuite/cibuilder.py
> +++ b/testsuite/cibuilder.py
> @@ -54,7 +54,7 @@ class CIBuilder(Test):
>
> def configure(self, compat_arch=True, cross=None, debsrc_cache=False,
> container=False, ccache=False, sstate=False, offline=False,
> - gpg_pub_key=None, **kwargs):
> + gpg_pub_key=None, wic_deploy_parts=False, **kwargs):
> # write configuration file and set bitbake_args
> # can run multiple times per test case
> self.check_init()
> @@ -77,6 +77,7 @@ class CIBuilder(Test):
> f' ccache = {ccache}\n'
> f' sstate = {sstate}\n'
> f' gpg_pub_key = {gpg_pub_key}\n'
> + f' wic_deploy_parts = {wic_deploy_parts}\n'
> f'===================================================')
>
> # determine bitbake_args
> @@ -105,6 +106,8 @@ class CIBuilder(Test):
> f.write('IMAGE_INSTALL_remove = "example-module-${KERNEL_NAME} enable-fsck"\n')
> if gpg_pub_key:
> f.write('BASE_REPO_KEY="file://' + gpg_pub_key + '"\n')
> + if wic_deploy_parts:
> + f.write('WIC_DEPLOY_PARTITIONS = "1"\n')
> if distro_apt_premir:
> f.write('DISTRO_APT_PREMIRRORS = "%s"\n' % distro_apt_premir)
> if ccache:
> diff --git a/testsuite/citest.py b/testsuite/citest.py
> index 6c8eb26e..8381f21c 100755
> --- a/testsuite/citest.py
> +++ b/testsuite/citest.py
> @@ -223,6 +223,29 @@ class RebuildTest(CIBaseTest):
> finally:
> self.restorefile(dpkgbase_file)
>
> +class WicTest(CIBaseTest):
> +
> + """
> + Test creation of wic images
> +
> + :avocado: tags=wic,full
> + """
> + def test_wic_nodeploy_partitions(self):
> + targets = ['mc:qemuarm64-bookworm:isar-image-base']
> +
> + self.init()
> + self.delete_from_build_dir('tmp')
Removing tmp during this test also removes all the images needed for further
VmBootTests. The easiest way to fix that is moving wic test below boot
tests.
> + self.perform_wic_partition_test(targets,
> + wic_deploy_parts=False, debsrc_cache=True, compat_arch=False)
> +
> + def test_wic_deploy_partitions(self):
> + targets = ['mc:qemuarm64-bookworm:isar-image-base']
> +
> + self.init()
> + # reuse artifacts
> + self.perform_wic_partition_test(targets,
> + wic_deploy_parts=True, debsrc_cache=True, compat_arch=False)
> +
> class ContainerImageTest(CIBaseTest):
>
> """
next prev parent reply other threads:[~2022-09-27 7:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 7:33 [PATCH v6 0/6] use xz and gzip on host (outside chroot) Felix Moessbauer
2022-09-21 7:33 ` [PATCH v6 1/6] do not crossbuild SDK for host-arch eq dist-arch Felix Moessbauer
2022-09-21 7:33 ` [PATCH v6 2/6] run imager in buildchroot-host on cross Felix Moessbauer
2022-09-21 7:33 ` [PATCH v6 3/6] Revert "wic: move out all files ending on "direct*"" Felix Moessbauer
2022-09-21 7:33 ` [PATCH v6 4/6] add option to control deploy of raw wic partitions Felix Moessbauer
2022-09-21 7:33 ` [PATCH v6 5/6] add test for wic partition deploy logic Felix Moessbauer
2022-09-27 7:00 ` Anton Mikanovich [this message]
2022-09-21 7:33 ` [PATCH v6 6/6] add wic.xz image to qemuarm64-bookworm Felix Moessbauer
2022-09-21 8:23 ` [PATCH v6 0/6] use xz and gzip on host (outside chroot) Gylstorff Quirin
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=a3e8a9ca-7ad5-6cb1-ea72-1b59d71c8086@ilbers.de \
--to=amikan@ilbers.de \
--cc=adriaan.schmidt@siemens.com \
--cc=felix.moessbauer@siemens.com \
--cc=henning.schild@siemens.com \
--cc=ibr@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.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