From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7278630385844486144 X-Received: by 2002:aa7:c90c:0:b0:52f:bb0b:57bd with SMTP id b12-20020aa7c90c000000b0052fbb0b57bdmr4114686edt.17.1694688197602; Thu, 14 Sep 2023 03:43:17 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:12d0:b0:525:455e:f9d1 with SMTP id k16-20020a05640212d000b00525455ef9d1ls460296edx.1.-pod-prod-01-eu; Thu, 14 Sep 2023 03:43:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJ1FmbcTJF/B/ACQuljR1pvih2gVgJyMd8LvpFYVtLRyUZliUdBgWUWwCRf9Orm3MLkJfh X-Received: by 2002:a17:907:6087:b0:9a1:d2ef:3e3b with SMTP id ht7-20020a170907608700b009a1d2ef3e3bmr4093585ejc.38.1694688195636; Thu, 14 Sep 2023 03:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694688195; cv=none; d=google.com; s=arc-20160816; b=HScPtZBy1bErRCo6nd/6cnrqpdECw6H+MxVrLeINGR51eTO4yjkbLUHXXI0VcqSXrx 12qeJUpfL/+/1po7yPI4xaqw5b9+krgVGLvsSNXXQfZdwnp602bFCwW3C9FGDI8QJsLj fSB65vNJA7XkVFOJaT8weZNDc8N8mqILdLil6XKMx+jt8H5X8/sgcxJ8nQdcYA6Wxese BAFF9xAKcTo64sh+dIopRIRNpT/kC1oyRj4VRg22JTsF2nLIPrKihPPNCowhtfgSOUzm YTU/arWWole8aclrGuK0EQPP2WTTgIPZ2CwuZAgDi1V6tSG3RKNNfllLkR6XgEeVcZEa wCYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=NS4u4ie29JtYg11pvqiIBgzoxeA58hCL3YpauGwVAjE=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=nJCG7nHSA+Q3D0UzYnLVZjMfAAMakDDoSvFDkJmdiwumZoQEwkSfIpeI6MkpJOTKer Ym597oz+JcKurswIRy/dVwedrOWQs5JeDkJFG6HsCodp1ugdNW+jArGr7FKdie6bND7G r4RggzkJ2rhSpCe5MQUVGq5xL90cB73TdLhHhdx5r7DYhUoWy38jKksTi/2j0xbtjaZ3 g10T7GCgLDK390VQybkZwbWoloPzXBsFM+eStAnGLolNxry7T1ZyKVnsqO3HpRxAR+Lx BIfy0/ZBoKBUjYivN+xoyuq1MNmsvYQoINtKMXsCVtQ+v8thCms21OMA8isdocEKIvKI rddw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id gs41-20020a1709072d2900b009adbab54deesi102922ejc.2.2023.09.14.03.43.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Sep 2023 03:43:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@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 ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (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 38EAhD5g019231 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Sep 2023 12:43:15 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH 2/3] testsuite: Rework cache populating of sstate-cache in SstateTest Date: Thu, 14 Sep 2023 12:43:12 +0200 Message-Id: <20230914104313.30231-3-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230914104313.30231-1-ubely@ilbers.de> References: <20230914104313.30231-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Eo2NZE/bAxe7 In SstateTest class we run first build to populate sstate-cache and the following builds to check if it's used or not. Since both first and following builds are started from the same isar location, this approach doesn't allow to find possible issues that are sensitive to this path. This patch moves sstate-cache populating to a separate test so that it uses a different isar location, e.g.: 1st build: "./isar-sstate" => "./isar-sstate/../sstate-cache"; 2nd build: "." => "./sstate-cache". Signed-off-by: Uladzimir Bely --- testsuite/cibase.py | 26 +++++++++++++++++++------- testsuite/citest.py | 6 ++++++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/testsuite/cibase.py b/testsuite/cibase.py index d9641377..d7010387 100755 --- a/testsuite/cibase.py +++ b/testsuite/cibase.py @@ -106,6 +106,25 @@ class CIBaseTest(CIBuilder): self.delete_from_build_dir('ccache') self.unconfigure() + def perform_sstate_populate(self, image_target, **kwargs): + # Use a different isar root for populating sstate cache + isar_sstate = f"{isar_root}/isar-sstate" + os.makedirs(isar_sstate) + process.run(f'git --work-tree={isar_sstate} checkout HEAD -- .') + + self.init('../build-sstate', isar_dir=isar_sstate) + self.configure(sstate=True, sstate_dir="", **kwargs) + + # Cleanup sstate and tmp before test + self.delete_from_build_dir('sstate-cache') + self.delete_from_build_dir('tmp') + + # Populate cache + self.bitbake(image_target, **kwargs) + + # Remove isar configuration so the the following test creates a new one + self.delete_from_build_dir('conf') + def perform_sstate_test(self, image_target, package_target, **kwargs): def check_executed_tasks(target, expected): taskorder_file = glob.glob(f'{self.build_dir}/tmp/work/*/{target}/*/temp/log.task_order') @@ -129,13 +148,6 @@ class CIBaseTest(CIBuilder): self.configure(sstate=True, sstate_dir="", **kwargs) - # Cleanup sstate and tmp before test - self.delete_from_build_dir('sstate-cache') - self.delete_from_build_dir('tmp') - - # Populate cache - self.bitbake(image_target, **kwargs) - # Check signature files for cachability issues like absolute paths in signatures result = process.run(f'{isar_root}/scripts/isar-sstate lint {self.build_dir}/sstate-cache ' f'--build-dir {self.build_dir} --sources-dir {isar_root}') diff --git a/testsuite/citest.py b/testsuite/citest.py index 48b10286..1e7a32c0 100755 --- a/testsuite/citest.py +++ b/testsuite/citest.py @@ -276,6 +276,12 @@ class SstateTest(CIBaseTest): :avocado: tags=sstate,full """ + + def test_sstate_populate(self): + image_target = 'mc:qemuamd64-bullseye:isar-image-base' + + self.perform_sstate_populate(image_target) + def test_sstate(self): image_target = 'mc:qemuamd64-bullseye:isar-image-base' package_target = 'mc:qemuamd64-bullseye:hello' -- 2.20.1