From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7142858516907163648 X-Received: by 2002:a50:ea89:0:b0:453:8b7d:12e8 with SMTP id d9-20020a50ea89000000b004538b7d12e8mr26356291edo.148.1664262021258; Tue, 27 Sep 2022 00:00:21 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b051:b0:77d:b590:5e60 with SMTP id bj17-20020a170906b05100b0077db5905e60ls384883ejb.8.-pod-prod-gmail; Tue, 27 Sep 2022 00:00:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Wj0Yoxxw07LEuuM5F2zR9yH8FXMj7TpSbSKjwo52W/3GjD/dX2D2FcA9YEegAXnXU2AoV X-Received: by 2002:a17:906:8469:b0:781:fc76:fbd7 with SMTP id hx9-20020a170906846900b00781fc76fbd7mr21707817ejc.486.1664262020066; Tue, 27 Sep 2022 00:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664262020; cv=none; d=google.com; s=arc-20160816; b=tLH0COjVEqYIKQYRD8d/ENGsjxGMlSva0WJ/YUcheUxheGZMvsoyGcHZVmnPwV4Ybz Rwae6sg4KuObBUFn5BCxMXUqzZD1IyFImVitegcQORw+lMXPfMeSLzrKjO+bbJ3CLieg QYVU7cwxwE5L8uCWIRaC4qyThsC5x894jV81yWMmQPq1trO0zTym3MJJmPaQ3usj69uA 2BdknlUbeFzWSqHKlLDbBbKa0dPk8p97gLON0+XGsVhC4YhLMlVuIsjpag3SmYmPMG2p JU1vee3HlTbGwyCdddTCCfFVPHRv0weqzsYeqkiYbdiIdyIGpU8NiKGHN2AVXab68bEn 2Csw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id; bh=DCKY39fcKkmRBijU6uhSl7CtgeUtdbKTmO5DSmXfVdc=; b=R++KHCmb7a1CH0K8RihF1c1H71nWQ2D/ldlAGdk+2yYcRx4n6m3abZezfFJ2UFtr0Y LPRAgI86821zB18nd7r5T7tvb2NniSmKO2P50a412RLapWeBQPosJIFz23rnibgF42cU Le1VXFfp1emXousY+7JOoJKWq1vPDl6yF3h0T9y5QzGWh5AsdpG/C+1k1XlFgx6n27nJ yBGoKHXqj/CtJXnJUFfqm7wBu7D931uvSM5yrw0seBwXhsxtwF9rNznSeHruNcFnMiK+ BCEd4gMEDHd/EMO4pDdIUWULNFQ8TG6A2AIEnWXK5YIVLmj9CCBt/UD0vMo6B6MaLsAB LOPA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id og17-20020a1709071dd100b0077e2b420e6esi22906ejc.0.2022.09.27.00.00.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Sep 2022 00:00:19 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 28R70Gq5023170 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 09:00:18 +0200 Message-ID: Date: Tue, 27 Sep 2022 10:00:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v6 5/6] add test for wic partition deploy logic Content-Language: en-US To: Felix Moessbauer , isar-users@googlegroups.com Cc: henning.schild@siemens.com, jan.kiszka@siemens.com, ibr@ilbers.de, adriaan.schmidt@siemens.com References: <20220921073348.169965-1-felix.moessbauer@siemens.com> <20220921073348.169965-6-felix.moessbauer@siemens.com> From: Anton Mikanovich In-Reply-To: <20220921073348.169965-6-felix.moessbauer@siemens.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: KtdJ5q40ay0/ 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 > --- > 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): > > """