From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7353323043876241408 X-Received: by 2002:a05:6a20:2d22:b0:1a7:6e6:edd6 with SMTP id g34-20020a056a202d2200b001a706e6edd6mr2073038pzl.52.1712334749985; Fri, 05 Apr 2024 09:32:29 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:391a:b0:6ea:afca:4d5c with SMTP id fh26-20020a056a00391a00b006eaafca4d5cls1514679pfb.0.-pod-prod-02-us; Fri, 05 Apr 2024 09:32:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9WnmsnDdq1uLFbxU2xns1FxYd4JYd1LZrjE8NbZhh3SI0RX5wRqQqBbbMSM+vVU4BCVIj X-Received: by 2002:a05:6a20:9494:b0:1a7:3c98:e8fa with SMTP id hs20-20020a056a20949400b001a73c98e8famr1966213pzb.61.1712334748472; Fri, 05 Apr 2024 09:32:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712334748; cv=none; d=google.com; s=arc-20160816; b=g1XVBJNXfk9qBzOuB3Sx/Srub+NJsAGfx9PLyEBoDtVMB50i5v+9RzU7sFoAnVhhGY 2GjiqzlxTTXtdBoomgBkmtfKF1jckd33+PAG+DTKP6W3zxnwv5T8qSOO1dWz+meTrygr 0U+ArsQNQjRtZHJ+661LKIzXulR7VfsoIIQ6kqxO4QugoLH18UxJyupHi8iyWukQhI99 8ztgVOj3oDtOUjP/ilm4hSSUWVmvEwMygrN5rrbTT4k9fJX1JWsdr4oNtLyf1VRtZK51 02hWRyc7hNBF45xcMKDa3bhYJJQb76VMWlAck4umebnPoA23s/LTfwm6pm1ePE5S3oZl Xm7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=rvhd+APN7GH9y6CKXzx78NEB26OElTJF4+LasAkVfRc=; fh=3bh9z2BWAzGAc1byRhMi0K+arMZmX5BQHE0sOxINdyU=; b=uJiCcy6SILl10QlL+4B9vZ+I2E6Xl+8nXdfe+W6ZfW+Iymp1ew1fXva67sFH7a/s6T cYnCqIC75VONtiSH+xP7Rsc9EkRd1F6GthHmOtUeUY0wEBZ2jIcnpmfZSvf1r22VyM9V k51h1O3nU2oh87+9eIN+r6uiRaEf3LRtx19v06bvglp1q5yFY2bbsfmc8yaCtm13RunC 005zZn32yU23Ovls7C+axL8VADf0ozUUfRlbaeHv1p5R0O0vLBheFbQHI8cmqrNTCv01 Csn5VGGp3mLnpgmfcUVPdDLmqwU5+AAnB0LU7jaki4XQTzKqIBAXVg6Yran3v8UgFhrh Eh0Q==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=VSgzxdnS; spf=pass (google.com: domain of fm-1325773-2024040516322796ceba0726c45b3305-vryicf@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322796ceba0726c45b3305-VRYiCF@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id c4-20020a63d504000000b005f0a5113629si153309pgg.3.2024.04.05.09.32.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2024 09:32:28 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1325773-2024040516322796ceba0726c45b3305-vryicf@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=VSgzxdnS; spf=pass (google.com: domain of fm-1325773-2024040516322796ceba0726c45b3305-vryicf@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-1325773-2024040516322796ceba0726c45b3305-VRYiCF@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2024040516322796ceba0726c45b3305 for ; Fri, 05 Apr 2024 18:32:28 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=chris.larson@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=rvhd+APN7GH9y6CKXzx78NEB26OElTJF4+LasAkVfRc=; b=VSgzxdnSPU8aPbET2H2eg0lKQwUkshQi82eIbz6PZZXl2O0a/9PTNpOYSRIagZJ3w2DUsX 2QXCWZzFoYvrEdff2Ppx1QIzD4HPt10M1/dCrnZciOuTt2O9C7MYxwjn73C3Xliuuf6ZEDKg CRHiyJtZGMLonxbBZCCRGAlnYeGL0=; From: chris.larson@siemens.com To: isar-users@googlegroups.com Cc: Christopher Larson Subject: [PATCH 8/9] testsuite: add perform_signature_lint method Date: Fri, 5 Apr 2024 16:31:34 +0000 Message-Id: <20240405163135.2987489-9-chris.larson@siemens.com> In-Reply-To: <20240405163135.2987489-1-chris.larson@siemens.com> References: <20240405163135.2987489-1-chris.larson@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1325773:519-21489:flowmailer X-TUID: 8CuKxXVWRLnM From: Christopher Larson This method is provided to generate signature data for specified target or targets and check for cachability issues without having to complete a build. Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/42BMya5TAQAJ. Signed-off-by: Christopher Larson --- testsuite/cibase.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/testsuite/cibase.py b/testsuite/cibase.py index 90591f32..349a79f0 100755 --- a/testsuite/cibase.py +++ b/testsuite/cibase.py @@ -125,6 +125,25 @@ def perform_sstate_populate(self, image_target, **kwargs): # Remove isar configuration so the the following test creates a new one self.delete_from_build_dir('conf') + def perform_signature_lint(self, targets, verbose=False, sources_dir=isar_root, + excluded_tasks=None, **kwargs): + """Generate signature data for target(s) and check for cachability issues.""" + self.configure(**kwargs) + self.move_in_build_dir("tmp", "tmp_before_sstate") + self.bitbake(targets, sig_handler="none") + + verbose_arg = "--verbose" if verbose else "" + excluded_arg = f"--excluded-tasks {','.join(excluded_tasks)}" if excluded_tasks else "" + cmd = f"{isar_root}/scripts/isar-sstate lint --lint-stamps {self.build_dir}/tmp/stamps " \ + f"--build-dir {self.build_dir} --sources-dir {sources_dir} {verbose_arg} {excluded_arg}" + self.log.info(f"Running: {cmd}") + exit_status, output = process.getstatusoutput(cmd, ignore_status=True) + if exit_status > 0: + ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])') + for line in output.splitlines(): + self.log.error(ansi_escape.sub('', line)) + self.fail("Detected cachability issues") + 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') -- 2.39.2