From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7353323043876241408 X-Received: by 2002:a17:90a:c905:b0:2a0:569f:fa92 with SMTP id v5-20020a17090ac90500b002a0569ffa92mr269992pjt.0.1712078947617; Tue, 02 Apr 2024 10:29:07 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90b:2687:b0:2a2:7a11:a785 with SMTP id pl7-20020a17090b268700b002a27a11a785ls28667pjb.2.-pod-prod-00-us-canary; Tue, 02 Apr 2024 10:29:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH3CXNYTetaymTSeQV+5mC2CRxrzB4hRSZKeABNKhmRIvmAmp8WJ0pvZ5SUaUuP8Zls0R65 X-Received: by 2002:a05:6a21:398b:b0:1a7:c2d:98b9 with SMTP id ad11-20020a056a21398b00b001a70c2d98b9mr196593pzc.8.1712078946419; Tue, 02 Apr 2024 10:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712078946; cv=none; d=google.com; s=arc-20160816; b=l/95WkGk6LhJrr4EVIAOe88GK0LZnYLCjGb6/ARbHno+V8Ee5fYuoZ86UpwCI/xWfy jOre8fMf+opgxFwc40bsnPNJDT8jvDCqp6OC8jCytgbCUspH+3+YO+di7nFwWR0y9tXw wqDvoTTbqyvCLflhXc4leAvw7vw18wmsb5HU6MsuRy8MtoKinvJMRpylfZteYIx2nOvP JZ+C4b+VwKkwxTP9SWI1hC3pQ7AAUe9VOe37Ye7/o43UQF41NXWce6FJlrvY3/GNj1eD rfTK9i4Gc77EZgNhwKdGwHxeAAFXYKQFkrKNHv9CFBW8s9c81y3SWlWZ/zMWiQ0z2FcW cFeQ== 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:cc:to:from:dkim-signature; bh=8KrbPPIgO1XO88EUd87HvCpnyGpyq+1TiZiq52LRkp4=; fh=oQsVBfLFKOCDpQI4v78XDUCp+c0vYPEMW+xCOFIgP4c=; b=vWrTgNFOOlY8yXbZ0C9hj5XyLZaeiebwUx7pcF+7Mr63MOKW5vrAsg+x/jecKinoWS UBQSD8g+dHWPgfCBv85Ch6DYSscuR4oxwZ4XfFxUsUa97HY2AsZEd8EfSdpMBA1Bp6Ky o2ILFm7AJmuqQvLN2pPYyWhbuDuY44O7HTV35LFM0th0prE1SacTt/E7yRvqB7ut+vRS D5GD+ACTIinQBnzMLiczATgrbSAvWUGB6c7zs9PmGJkaRZ0jgOHVY/y2BN5leFWkeWaY kyfLtyfPrcGvk6Yazde5D3lAV7jTUPNUfQ9hcoIpt/7qiSQxxMy9DuCTftWFtVfB60PT zJ4g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LNVGHOuY; spf=pass (google.com: domain of kergoth@gmail.com designates 2607:f8b0:4864:20::102a as permitted sender) smtp.mailfrom=kergoth@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com. [2607:f8b0:4864:20::102a]) by gmr-mx.google.com with ESMTPS id d126-20020a633684000000b005f0a5113629si500562pga.3.2024.04.02.10.29.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Apr 2024 10:29:06 -0700 (PDT) Received-SPF: pass (google.com: domain of kergoth@gmail.com designates 2607:f8b0:4864:20::102a as permitted sender) client-ip=2607:f8b0:4864:20::102a; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LNVGHOuY; spf=pass (google.com: domain of kergoth@gmail.com designates 2607:f8b0:4864:20::102a as permitted sender) smtp.mailfrom=kergoth@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-29f69710cbbso70642a91.1 for ; Tue, 02 Apr 2024 10:29:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712078946; x=1712683746; dara=google.com; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8KrbPPIgO1XO88EUd87HvCpnyGpyq+1TiZiq52LRkp4=; b=LNVGHOuY+XMmmeeb0gHTYISXnpm6u+f3yGcIkjXhczxzpKs8hA0gDN1DaSl0ziHD5k DIOF+QARZjBtO2SIemcV8uqVko47sDJikVNpSsi9r43ELZryAHHXDjngpHn3hm+MTWUy tb6U1aPxorhEf8I2bEtdwACfPDRzvV5dkSIGA16Zaetbp/pvfJxwZ6ZJC27fbyDRTGtY qOYUFxKKZr8VaFh3olEOVjYN3djbOMy3WPdnc2THkhpSSu12jMVKPR1kNHsmWBakw8at 1HFaHkyG2IbgAbBKnjXNiG2a161id8g/8E1V1+VT999Ir2LuKU9KPq8ugD+bat/77YSw Co6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712078946; x=1712683746; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8KrbPPIgO1XO88EUd87HvCpnyGpyq+1TiZiq52LRkp4=; b=fEs9v8LiqlPtuhLrD2H9t9PFGouixBPLOjgZkj8MdhDaNPdKRbYcQdjnoTeeff5JvX M2a4BHTK57e3RE4zCrYbyQ4Ji0YMBaHC6w6EyF7UtreDyMFx12GXm31rh15LkjWqiZY1 4y14GKmnLOZxbOCdoX+revO2qWk+WcNkxBasN2x7ZlIbI6xJ1KBwBsyVmZX/IhP57PSl jZAdWVXaFjZloZzryG72mq5wv2Nb6X/ygjNGa2CB2JRtghhawwnmjFBv/p3EcPaSPPBh RLVAV30YmUcCwGpdsEgGfixLFUrRvhD4/NTXk/VjzXYmDWB1sgI5waNOjNm6no0W4jEu qDEg== X-Gm-Message-State: AOJu0Yy0iksq/hycdaMBr+3pUhiJ5pPqpl9PgVu2qBEvLH56e0PyXNoe sKqVlUid5pTFIClwiBZhAQCcESbXpy4I8+ypLra6+S3uF03XSdUcmTQLAkld534= X-Received: by 2002:a17:90b:216:b0:29c:7641:5b8f with SMTP id fy22-20020a17090b021600b0029c76415b8fmr189432pjb.20.1712078946076; Tue, 02 Apr 2024 10:29:06 -0700 (PDT) Return-Path: Received: from dc4670097af0.alm.mentorg.com (nat-mam.mentorg.com. [139.181.8.34]) by smtp.googlemail.com with ESMTPSA id bt19-20020a17090af01300b002a2313f62dcsm66705pjb.0.2024.04.02.10.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 10:29:05 -0700 (PDT) From: kergoth@gmail.com X-Google-Original-From: chris.larson@siemens.com To: isar-users@googlegroups.com Cc: Christopher Larson , Christopher Larson Subject: [PATCH 8/9] testsuite: add perform_signature_lint method Date: Tue, 2 Apr 2024 17:28:12 +0000 Message-Id: <20240402172813.418770-9-chris.larson@siemens.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240402172813.418770-1-chris.larson@siemens.com> References: <20240402172813.418770-1-chris.larson@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: wdSdiMXFmHuc 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. 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