From patchwork Tue Jul 1 07:33:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 65889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AE77C8302F for ; Tue, 1 Jul 2025 07:34:21 +0000 (UTC) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mx.groups.io with SMTP id smtpd.web10.4577.1751355254691711631 for ; Tue, 01 Jul 2025 00:34:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=x+IfkEzk; spf=pass (domain: linaro.org, ip: 209.85.208.171, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-32b3b250621so50039651fa.2 for ; Tue, 01 Jul 2025 00:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751355253; x=1751960053; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3R2dEA1OM3H9BLmAYzVTmitPM3HIu1HbgrsQr3EeoZE=; b=x+IfkEzk3Mfvn51xo5K7dm+SV10PtFFuudS02X/1JCgttsv3EIAB0lofC6EqxeWiDC sP+dqGVk4QB5k3M2JncC6kxqnwpk39F9PW9xNhUUtFs5v0Jl9enPlCKsi3j8GyKQmBxD PIbJZJX3Jj6+Q/E2Hkci5+wKf26G6toUpfTSp+fB1Cq15nIeFur4EV+s0WnwqtpcLqy2 XbwFdRaMdsZH1UpcfZUJMiz2U0GaAmpXLCIZ+kq1Ydk7Tr7niFHqWNGos7dtynqDV6+g i6mNVNS9wrmxDFIWJh/Zcx3/P2t7dQhDobZc1S3hZAVBgvN59n5/+PQOahsEkGPU7Up5 L1dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751355253; x=1751960053; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3R2dEA1OM3H9BLmAYzVTmitPM3HIu1HbgrsQr3EeoZE=; b=jt2/aoTG6oq7Hbr8ceeg5b7U/MnfV4AsP0bmPJbJ722PzJuy/ivaDkJXX9zFHaQNUd zljVW9mzUMeNmFPOmpZazD+VIAbynAd7FO9QU2da1GyCkObFJDSFNS/g1XcVxbPg4chg MIfmTlCfclbI0BvA/V3z1w5SNbniJtkpiPrXvSNuemfLvnpNQOPU340lBbjkHbixYEWG k+xzG0aJc6HkFJsgZRFroNQWdvp9exIvopT89hus2TUPm5AkgRLovs6MGHJs9h3Rc0n6 Y4RAfV7D1NoSqGmUKZk1ghvjVoF8uCbcIUkn/OQm1/RJJintNSgjDXCD1cvC7JSm8A/U Oc6Q== X-Gm-Message-State: AOJu0Yy8C8oYf/xyYBkvYmLZyPxH1Ngh/xWpZ1I/OJs/5VPoGlXAN7u5 ei763fT4zPOBii2J0Z49EBP5z4q45K32pqH4p5ZE7/42yycaqWU6hggEligfuzbWCvM7uP0zGnn Jl/X5iLA= X-Gm-Gg: ASbGncv/Ly3gDuC6o9YrrLoW4I27ZynrZzcLISxyjPcx1xTYtC6bd5rBdswFZp0T5m7 AhnfUaQB/KrCh8jFeHs0g25zN8BdIACWz5EHn6KK+3SUvHPQG9SPExntp7JG0F7zpY5fXtkIDck ojEvWpguKekvCNv6YEMus9qtKv1+FcwAnRWBLIsu6Og6IBFp7YB6wzn44fFmxG7bdxfsKFBirTX 0MzslPD28sQN3WghHAs9+Vu1ig8PYi5wu5t64xZNd+DAcKkDoNywXdREdWBBNeuIza42GNcnY2T E2V13uqpEvqBMfu5ZROK0Q+tzGaeMJQqMousvzc3ZCDfYBdT57ixvMnWTfwDlThnuzsansQ+5Lj k6qw0jncywfXSWRS0XpV6tmgufLEUOEKtyTvFbLw= X-Google-Smtp-Source: AGHT+IGQfE63R3LjisRsdvL76yktK9w1/M4RH09axLATQB/Qb7D4Zj0EHP5oXih7qDcz0ZktVgnQfA== X-Received: by 2002:a2e:be11:0:b0:32c:de97:6ff7 with SMTP id 38308e7fff4ca-32cde977153mr56930641fa.29.1751355252597; Tue, 01 Jul 2025 00:34:12 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32cd2dead99sm15268581fa.22.2025.07.01.00.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jul 2025 00:34:12 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 1/6] oeqa runtime: set self.runner and handle None Date: Tue, 1 Jul 2025 10:33:54 +0300 Message-ID: <20250701073359.979368-1-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 01 Jul 2025 07:34:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219548 Set default self.runner to None. qemu target sets the runner to qemu. Then handle self.runner None in run_network_serialdebug(). This way ssh runner and failing ping or ssh tests handle the error cases. Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/core/target/__init__.py | 1 + meta/lib/oeqa/runtime/case.py | 2 ++ 2 files changed, 3 insertions(+) v2: setting self.runner for all target types instead of target conditional paths in tests v1: https://lists.openembedded.org/g/openembedded-core/message/219377 and https://lists.openembedded.org/g/openembedded-core/message/219378 diff --git a/meta/lib/oeqa/core/target/__init__.py b/meta/lib/oeqa/core/target/__init__.py index 1382aa9b5239..177f648fe358 100644 --- a/meta/lib/oeqa/core/target/__init__.py +++ b/meta/lib/oeqa/core/target/__init__.py @@ -10,6 +10,7 @@ class OETarget(object): def __init__(self, logger, *args, **kwargs): self.logger = logger + self.runner = None @abstractmethod def start(self): diff --git a/meta/lib/oeqa/runtime/case.py b/meta/lib/oeqa/runtime/case.py index 9515ca2f3d62..2a47771a3d47 100644 --- a/meta/lib/oeqa/runtime/case.py +++ b/meta/lib/oeqa/runtime/case.py @@ -23,6 +23,8 @@ class OERuntimeTestCase(OETestCase): uninstall_package(self) def run_network_serialdebug(runner): + if not runner: + return status, output = runner.run_serial("ip addr") print("ip addr on target: %s %s" % (output, status)) status, output = runner.run_serial("ping -c 1 %s" % self.target.server_ip) From patchwork Tue Jul 1 07:33:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 65890 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BD60C83038 for ; Tue, 1 Jul 2025 07:34:21 +0000 (UTC) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by mx.groups.io with SMTP id smtpd.web11.4663.1751355256745435894 for ; Tue, 01 Jul 2025 00:34:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=RHB+YrWw; spf=pass (domain: linaro.org, ip: 209.85.208.173, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-32b435ef653so42966631fa.2 for ; Tue, 01 Jul 2025 00:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751355255; x=1751960055; darn=lists.openembedded.org; 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=1DTUB9X5GgYcgEpNF4OJGtzgYuPO+9/qpUKDwNSCqCA=; b=RHB+YrWwva48hIERtCmHQRdAAAxmLBdY+DI1Fo53Yvy0XYmU4f7e4szjnXEyEvmvnq y/9epe+l21g0tZcmrdSk9WNs7HWkpVsq29Ifr+Dq5rRovQLe2QBSQKLOYfVoSL/mX8WF ccUnYwUQNz60cKOOkmBUM/in/cQbyOrR+cabdY7Wz9nneTDXWiCbqN4nQRVc1LKFN6J4 ATYiX20fZ9GWddp4N4XSximms2oaoYCiHrLTdvmVpTms6MpzezeB0SYyZCwwjvE9gSky 2K6MKzOHSgvm2tZqH8bRD/PLq29oiR3yggYGSYdmVUZWjR5JDRQf8FEtzSwhquCZ5ZXf KPjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751355255; x=1751960055; 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=1DTUB9X5GgYcgEpNF4OJGtzgYuPO+9/qpUKDwNSCqCA=; b=pU/gjfmAkDKQidj2Yx5957b88jQLsHbZr2iwPiu2qkFP9eduDeXlqiu+33kf9Iw8eI /PZykwv90L90pDOPHHyi1lQgxpGQJPLra5UR8JzTeg3Dbsi5LgX6LwWM3/AGM9WzC2AY K7A57/LsnYTFMs22epF7ACT/6Aoi6dhn6I+O+W4ggU5ysdjMZx8Ou5Rvn52bFeEkXqEc 2tojUDAN6igvhmyYU3Ly97Fgk5+nwgZc3SIfbuDB/wYcHsAvEuVe6eJKGyKOamV/W6bY hcVLQ7bKx3NLxpk39CMl/jheupivFOhfdev0oLVaNOMpYCgactI3yrDgVhRTf/HeNcUV L+Hw== X-Gm-Message-State: AOJu0YyANdxe9/m0Vh7jv4izq7vTWwi25xt/GOqavpbocUuMbhy7jJcm tlZZ8i9uv9M3A6u3pG36J3Kz1DpCCmvBV5UoGQHoeBiU1Plgc4eCL0ZWeY4vyqfkGE37sWd/Ifi wMpDLb7s= X-Gm-Gg: ASbGncu15k+KUWXCZn1zf6p32L0tgAS7cRvrCRkH8cFivYnftB+qvUD0nc4Wcl+bCBU HJBOcMydCYMCAqXn+o7UC+C4+eDklyEd18L0DilHhj4EXLTg7P5SnbkkKFg1YNhce8+jMhn1Uhl rVoR9ENpPaVoilB2LPBi21zBLJAc9Rw7Ls0wSMnl5ofrgBhLBvQUpiaIk/Qsc+pdGdpllSPy9L9 zcXGLerS2K2VA+FklwMdkhmoFurjN6g/383DyLFr4O0uJevQ89eNXIhOS0Z636NOVuPyaFQKHl7 IiTOaRKuANSMyvNc3kqDdcVj8N4w/R08ZdfJv2r1UZxXs+OScWHO5aTWbXHEGBpIcq0hG55fNVf /lbWQfnTw/jpASDhLy6iY3LspOQTjEAD59zsvGqw= X-Google-Smtp-Source: AGHT+IGWhSMIll5VOXvXYlvuBnNYqEbOdNsVwZacjebDjW0m86eXFmo5NQQwK80Rhc7mEXBWrIf8FQ== X-Received: by 2002:a05:651c:4ca:b0:32b:75f0:cfb1 with SMTP id 38308e7fff4ca-32cdc519965mr45273901fa.24.1751355254670; Tue, 01 Jul 2025 00:34:14 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32cd2dead99sm15268581fa.22.2025.07.01.00.34.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jul 2025 00:34:14 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 2/6] oeqa runtime apt.py: check errors and fix quoting Date: Tue, 1 Jul 2025 10:33:55 +0300 Message-ID: <20250701073359.979368-2-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250701073359.979368-1-mikko.rapeli@linaro.org> References: <20250701073359.979368-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 01 Jul 2025 07:34:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219549 Check that shell commands succeeded and fix quoting warning: core-image-minimal/lib/oeqa/runtime/cases/apt.py:44: SyntaxWarning: invalid escape sequence '\[' self.target.run("cd %s; cp sources.list sources.list.bak; sed -i 's|\[trusted=yes\] http://bogus_ip:bogus_port|%s|g' sources.list" % (apt_get_sourceslist_dir, apt_get_source_server)) Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/runtime/cases/apt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/runtime/cases/apt.py b/meta/lib/oeqa/runtime/cases/apt.py index 8000645843aa..b7cda0095394 100644 --- a/meta/lib/oeqa/runtime/cases/apt.py +++ b/meta/lib/oeqa/runtime/cases/apt.py @@ -36,12 +36,12 @@ class AptRepoTest(AptTest): def setup_source_config_for_package_install(self): apt_get_source_server = 'http://%s:%s/' % (self.tc.target.server_ip, self.repo_server.port) apt_get_sourceslist_dir = '/etc/apt/' - self.target.run('cd %s; echo deb [ allow-insecure=yes ] %s/all ./ > sources.list' % (apt_get_sourceslist_dir, apt_get_source_server)) + self.target.run('cd %s && echo "deb [ allow-insecure=yes ] %s/all ./" > sources.list' % (apt_get_sourceslist_dir, apt_get_source_server)) def setup_source_config_for_package_install_signed(self): apt_get_source_server = 'http://%s:%s' % (self.tc.target.server_ip, self.repo_server.port) apt_get_sourceslist_dir = '/etc/apt/' - self.target.run("cd %s; cp sources.list sources.list.bak; sed -i 's|\[trusted=yes\] http://bogus_ip:bogus_port|%s|g' sources.list" % (apt_get_sourceslist_dir, apt_get_source_server)) + self.target.run("cd %s && cp sources.list sources.list.bak && sed -i 's|[trusted=yes] http://bogus_ip:bogus_port|%s|g' sources.list" % (apt_get_sourceslist_dir, apt_get_source_server)) def cleanup_source_config_for_package_install(self): apt_get_sourceslist_dir = '/etc/apt/' @@ -49,12 +49,12 @@ class AptRepoTest(AptTest): def cleanup_source_config_for_package_install_signed(self): apt_get_sourceslist_dir = '/etc/apt/' - self.target.run('cd %s; mv sources.list.bak sources.list' % (apt_get_sourceslist_dir)) + self.target.run('cd %s && mv sources.list.bak sources.list' % (apt_get_sourceslist_dir)) def setup_key(self): # the key is found on the target /etc/pki/packagefeed-gpg/ # named PACKAGEFEED-GPG-KEY-poky-branch - self.target.run('cd %s; apt-key add P*' % ('/etc/pki/packagefeed-gpg')) + self.target.run('cd %s && apt-key add P*' % ('/etc/pki/packagefeed-gpg')) @skipIfNotFeature('package-management', 'Test requires package-management to be in IMAGE_FEATURES') From patchwork Tue Jul 1 07:33:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 65891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 283FFC8303C for ; Tue, 1 Jul 2025 07:34:21 +0000 (UTC) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by mx.groups.io with SMTP id smtpd.web11.4664.1751355258732052439 for ; Tue, 01 Jul 2025 00:34:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=Uyeo2p5Z; spf=pass (domain: linaro.org, ip: 209.85.208.179, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-32b78b5aa39so28371231fa.1 for ; Tue, 01 Jul 2025 00:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751355256; x=1751960056; darn=lists.openembedded.org; 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=hCK3oQ8eKM75QM800h3N+9mFwXG1w0Pafrr0NA1MpoM=; b=Uyeo2p5ZoqDKacfZQv/UXHLTR2FktHeEiAY7MZZNK8NpHnB1XfdHcJAVKjOqJfIdIT wiemNYNZbISh7QrAtGUvar+KhBFt9XKfcXhYaZ3IYWn6d3M/daQmz+CHVboRktBFp9YK noS8YVlZwZX91MuM+g+iFgAoNgEGxD/p6OravTYm4BckEGDDywrjouE4XyV8rCsCHZxs bQ4pwX5VlpFgQELu5EIhdCQMwdt+N+/cLtdTJlVUZ7LjdXldNapa6L8hFPoTFAhdDn0v X7t7H1cx+U6/Meb0RxffeK98BfapHDuToiWMZbmfl+FPNKCSVryWTrG/sLgiA/U5WM8j Cv6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751355256; x=1751960056; 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=hCK3oQ8eKM75QM800h3N+9mFwXG1w0Pafrr0NA1MpoM=; b=VlKSh6BV7L4aQdXzOAYljCOBGiCqeESDewb45L7T472ezvUMDwkVXaiUwdmDdKmNZc sG0pfdKbx8dmgb5OCD2aaZaSfKFzD0UIy1lLCVChiWHZmliwO2T+Ag3ggecVEqBmA3ux gEwYE6We52WgYHm2Dq+Fvf+89J+QYF/2hUX5GOctFg6ncGye1gJyE+Q76Aei3XPE0gbm Svh/TejZBVufLqUaylz1kBArvQxJEnS3s81R7B6W4MPRPkmAlXlN58wC6P1CfwGgVmu1 dKAyQfqqtv2ZQVVcur5Y/0DbHXLOfDLfeQZeAfRFO2Ugm9DZr14yeM5LcOzx9oSLGLkC zOhw== X-Gm-Message-State: AOJu0YwMF11mOy46LNEEJS2834GuGXCodTJMRVPy1s623xYL6oFZgAn9 HEynkv+l2/ayTOl3f1/NtTQawwmO6CCW4uxdxdoxY2APQP/3gleBPH/yBX6fIOTbRxH/C3sWHFd 4pkRLAX8= X-Gm-Gg: ASbGncs7SDIRdrZL4U80/Ur8YpvS+S4+fhYTsKm302EkoC3gpqju0HMKmGHIDDCaVmQ imNDfU2oAVVsP/eeVtp0xboqz6wllIUG9J10n1IvhXL6UFSEAfpNWFpbeqBGHub1sq3WmPGWvhA pDhi17KN4z/5cp+vhF+q2/jm45YXxnWhidCLaDxe4ZH9diy7pMUHNIcHY9WqOwzZBNNYpwn9bRe gMHGd+A9actQpYg2LFmvkiRLwuTgWDMPbiQt5CDW88WhcmmEPNSB7p74l27eNIv8E7dUx2arJq3 99COg7bxuuIfaxF+VNsMbvZZngobXmt/monotScdT8XXIJVLCMYt+HCa3PcOrLHUIFLhgnJU+LA xoTVeURpiJpJUDIHO2BHKuEbGNyejQZL9NKOVYeE= X-Google-Smtp-Source: AGHT+IHpxoaj4yAqCnk7N8JYxI21JG0eqKF9GiDzzdpQKRkPcYxj43gItT8gY/D1DZUAkOF0xhE9Dw== X-Received: by 2002:a05:651c:4207:b0:32b:a8f7:9176 with SMTP id 38308e7fff4ca-32cdc4574f8mr41864441fa.3.1751355256357; Tue, 01 Jul 2025 00:34:16 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32cd2dead99sm15268581fa.22.2025.07.01.00.34.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jul 2025 00:34:16 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 3/6] oeqa context.py: use TEST_SUITES if set Date: Tue, 1 Jul 2025 10:33:56 +0300 Message-ID: <20250701073359.979368-3-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250701073359.979368-1-mikko.rapeli@linaro.org> References: <20250701073359.979368-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 01 Jul 2025 07:34:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219550 If build target has set TEST_SUITES, then that should be the default test modules to execute. Fixes testexport.bbclass to run same tests as testimage.bbclass which already uses TEST_SUITES. Signed-off-by: Mikko Rapeli --- meta/lib/oeqa/core/context.py | 7 +++++++ 1 file changed, 7 insertions(+) v2: added check for unset TEST_SUITES variable which caused failures in autobuilder v1: https://lists.openembedded.org/g/openembedded-core/message/219380 diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py index 9313271f5865..46de9135c179 100644 --- a/meta/lib/oeqa/core/context.py +++ b/meta/lib/oeqa/core/context.py @@ -179,9 +179,16 @@ class OETestContextExecutor(object): else: self.tc_kwargs['init']['td'] = {} + # Run image specific TEST_SUITE like testimage.bbclass by default + test_suites = self.tc_kwargs['init']['td'].get("TEST_SUITES") + if test_suites: + test_suites = test_suites.split() + if args.run_tests: self.tc_kwargs['load']['modules'] = args.run_tests self.tc_kwargs['load']['modules_required'] = args.run_tests + elif test_suites: + self.tc_kwargs['load']['modules'] = test_suites else: self.tc_kwargs['load']['modules'] = [] From patchwork Tue Jul 1 07:33:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 65892 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 283C3C8303B for ; Tue, 1 Jul 2025 07:34:21 +0000 (UTC) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mx.groups.io with SMTP id smtpd.web10.4578.1751355260121487320 for ; Tue, 01 Jul 2025 00:34:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=QjkBPZcC; spf=pass (domain: linaro.org, ip: 209.85.208.178, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-32addf54a01so55182681fa.3 for ; Tue, 01 Jul 2025 00:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751355258; x=1751960058; darn=lists.openembedded.org; 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=Bh0K2X3zKys6o7GQ9IGTFFDIrbsnXFUEWr9wDdouecY=; b=QjkBPZcCUInu2JV1dzwxfuRYYOg41AjjLN/nisfQjay/76EGRs982mWKAPYgKU27dK oLtnuVkHM0+ntyWlfD3QOg6EpoX59n4KJb0fLIvdHLQvOv88Nag+xHm5RqCB/yGSAULO 1//fOOGmhh7IJ9u1CUu1on+YGO5IcQh7vJxUJHhKwHzRSdBBA0GjELOn1SeV0G9DTYpn 94gwUfRnq9tvs3n11zpovYioZ1OB/jVM5ebcNjGU/U/U5OtgXxfssnZD+QLIWpty1c92 5KTVz6aFvNIe1lavWBGDM9baLBWcTjXZgH1BoUTZcdXuVtlR2tekQ4RPlxNB6Hl90Ujz Ay7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751355258; x=1751960058; 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=Bh0K2X3zKys6o7GQ9IGTFFDIrbsnXFUEWr9wDdouecY=; b=uzFNQiLS29mY708nH/POfMS/m3QTZjnPcsh9Jtucgr+tlVP0VS6HXjWYeKqW6Y+DUa vkBCytfti/G7FbldMgZeHA0NmAaxo0pfHIijshY+ngjkY1yF6PZDElwiSTbigdyoIcNC D6NnO0ID/hslenXHch/ttJ7cnchhUmzI6gnuBOb56Xe8yftFEzV60Ik4sCGw9eZ8gh9c oHzBgt756NTWvgXLidLIzGaBKDQkUGAiop5CCAXxBFKN40EoSWOcG5QvZ4gMyuYYbB5E 2Zo9HovsOfjP4tGpXswT4wFxNAvvrHXnMRDRE9e+oyVjZlA02rJyP0kZ5YUXv7UDPadK ix+w== X-Gm-Message-State: AOJu0YwGe1EwLg8bZxV8cz12xeGH5DeT9uuGpEruzx/ikZeZU6EV6up6 jZLEEj0r3hp9wYnFPrJIZ/mlv17ap4PjhAEnqqq9bDbjqJxV6/OFAo+zg9Qfs1ztiLbhs3c1sGh lPE5jn/Y= X-Gm-Gg: ASbGnctxCIj7Jf6erU66w6XQrZJ+qjDLloO1QCnZjPXLSbiZh9oN2/q2QDxsWm1Daun zMR4MHjwauOBzXWwh+XmfPhTQV6MG8Grr69h3MMevYZI1bzcxpwJ4CNG9DJ/WKXQmU6//tbOu+8 PmmjK4nXp3wi4Rk/RXU1TUeW3wI6/+fjehJaJpxzBd5UPQ2qDqGIu1A2Q59TekjwDAhNSz2CvKJ V5giQblgRSS3bNVF+hgsA2AZiu1llo7AcsHQLLnjVejHhI3eJHaknulwMDr+HJmIl0SMB2VYRH0 +zucftzLi3pfWQx3oygY9w5BnRmGK6ZhiMyaQUZKpdQyV2Bnv5KMF12K/v7vFrHHn/hUpVuai/y jaBrP4PU7ZlkyxiKpwVhE/R4l6SEC/BAnv1BtaFM= X-Google-Smtp-Source: AGHT+IGcaWqDfowD80l42zXhS28xRshVtgh3/aWtoUUb00/xXG0lMQggdE6c3zDlMQljU+L+YHxrUQ== X-Received: by 2002:a05:651c:214f:b0:32a:ec98:e15c with SMTP id 38308e7fff4ca-32cdc4f217amr35385051fa.19.1751355258060; Tue, 01 Jul 2025 00:34:18 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32cd2dead99sm15268581fa.22.2025.07.01.00.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jul 2025 00:34:17 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 4/6] testexport.bbclass oe-test: capture all tests and data from all layers Date: Tue, 1 Jul 2025 10:33:57 +0300 Message-ID: <20250701073359.979368-4-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250701073359.979368-1-mikko.rapeli@linaro.org> References: <20250701073359.979368-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 01 Jul 2025 07:34:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219551 testexport.bbclass only copied files from core layer to the testexport.tar.gz to run tests. Then it filtered out tests and files which were not specified in TEST_SUITES variable. Remove filtering of files to include parselogs.py test data files which are machine and/or layer specific. TEST_SUITES variable is now read from build time exported data store when running tests so there is no need to remove files from exported tests in testexport.bbclass. Adapt oe-test script to find "lib" directories from the new structure with layer specific paths which are used to find tests and test data files. Signed-off-by: Mikko Rapeli --- meta/classes-recipe/testexport.bbclass | 43 +++++++++++++------------- scripts/oe-test | 12 ++++--- 2 files changed, 30 insertions(+), 25 deletions(-) v2: tried to improve commit message to clearly say that test filtering is removed v1: https://lists.openembedded.org/g/openembedded-core/message/219381 diff --git a/meta/classes-recipe/testexport.bbclass b/meta/classes-recipe/testexport.bbclass index cc4088c71a13..843d777e3bb9 100644 --- a/meta/classes-recipe/testexport.bbclass +++ b/meta/classes-recipe/testexport.bbclass @@ -85,6 +85,7 @@ def copy_needed_files(d, tc): export_path = d.getVar('TEST_EXPORT_DIR') corebase_path = d.getVar('COREBASE') + bblayers = d.getVar('BBLAYERS').split() # Clean everything before starting oe.path.remove(export_path) @@ -92,17 +93,11 @@ def copy_needed_files(d, tc): # The source of files to copy are relative to 'COREBASE' directory # The destination is relative to 'TEST_EXPORT_DIR' - # Because we are squashing the libraries, we need to remove - # the layer/script directory - files_to_copy = [ os.path.join('meta', 'lib', 'oeqa', 'core'), - os.path.join('meta', 'lib', 'oeqa', 'runtime'), - os.path.join('meta', 'lib', 'oeqa', 'files'), - os.path.join('meta', 'lib', 'oeqa', 'utils'), - os.path.join('scripts', 'oe-test'), + # core files/dirs first + core_files_to_copy = [ os.path.join('scripts', 'oe-test'), os.path.join('scripts', 'lib', 'argparse_oe.py'), os.path.join('scripts', 'lib', 'scriptutils.py'), ] - - for f in files_to_copy: + for f in core_files_to_copy: src = os.path.join(corebase_path, f) dst = os.path.join(export_path, f.split('/', 1)[-1]) if os.path.isdir(src): @@ -110,18 +105,21 @@ def copy_needed_files(d, tc): else: shutil.copy2(src, dst) - # Remove cases and just copy the ones specified - cases_path = os.path.join(export_path, 'lib', 'oeqa', 'runtime', 'cases') - oe.path.remove(cases_path) - bb.utils.mkdirhier(cases_path) - test_paths = get_runtime_paths(d) - test_modules = d.getVar('TEST_SUITES').split() - tc.loadTests(test_paths, modules=test_modules) - for f in getSuiteCasesFiles(tc.suites): - shutil.copy2(f, cases_path) - json_file = _get_json_file(f) - if json_file: - shutil.copy2(json_file, cases_path) + # layer specific files/dirs + layer_files_to_copy = [ os.path.join('lib', 'oeqa', 'core'), + os.path.join('lib', 'oeqa', 'runtime'), + os.path.join('lib', 'oeqa', 'files'), + os.path.join('lib', 'oeqa', 'utils'),] + for layer in bblayers: + meta = os.path.basename(layer) + for f in layer_files_to_copy: + src = os.path.join(layer, f) + dst = os.path.join(export_path, meta, f) + if os.path.exists(src): + if os.path.isdir(src): + oe.path.copytree(src, dst) + else: + shutil.copy2(src, dst) # Copy test data image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'), @@ -142,6 +140,9 @@ def copy_needed_files(d, tc): testexport_create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR")) # Copy packages needed for runtime testing + test_paths = get_runtime_paths(d) + test_modules = d.getVar('TEST_SUITES').split() + tc.loadTests(test_paths, modules=test_modules) package_extraction(d, tc.suites) test_pkg_dir = d.getVar("TEST_NEEDED_PACKAGES_DIR") if os.path.isdir(test_pkg_dir) and os.listdir(test_pkg_dir): diff --git a/scripts/oe-test b/scripts/oe-test index 55985b0b2453..efb83c3e7809 100755 --- a/scripts/oe-test +++ b/scripts/oe-test @@ -7,14 +7,18 @@ # SPDX-License-Identifier: MIT # -import os -import sys import argparse +import glob import logging +import os +import sys scripts_path = os.path.dirname(os.path.realpath(__file__)) -lib_path = scripts_path + '/lib' -sys.path = sys.path + [lib_path] +lib_path = os.path.join(scripts_path, 'lib') +sys.path.append(lib_path) +meta_lib_paths = glob.glob(scripts_path + '/*/lib', root_dir=scripts_path, recursive=True) +for p in meta_lib_paths: + sys.path.append(p) import argparse_oe import scriptutils From patchwork Tue Jul 1 07:33:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 65893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2143FC8302F for ; Tue, 1 Jul 2025 07:34:31 +0000 (UTC) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by mx.groups.io with SMTP id smtpd.web11.4665.1751355261154454984 for ; Tue, 01 Jul 2025 00:34:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=DFwkUsmQ; spf=pass (domain: linaro.org, ip: 209.85.208.181, mailfrom: mikko.rapeli@linaro.org) Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-32b553e33e6so26291581fa.2 for ; Tue, 01 Jul 2025 00:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751355259; x=1751960059; darn=lists.openembedded.org; 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=qXfpXT9vFjV4Ijv0D8UWy+lop4TnY9hd5VtpLJWVxXo=; b=DFwkUsmQBSBAIAbyhS5GiFeUfB8RL2MiOSlTZPAL3QcBF3LQKPaAs+f4xW1EbCGTbE W6RlN4rCHpjWwuX5Gb7EB8QneaCXEDzsH/mb8aqbCK4knN8amdMZq8WC0ogk0dK3XUZV NhUFZttR/XHi9bffOpTRnq8uHAyjX3y21ZAOKnzHrHeb2d+C8LspDwj0K+Cnl8ryIfL8 CCs3Te/qBv9Sjc6YszOxnPjOUTVqdKy9K5xjsTwW7ud5DrWtPm428QYwgjTEs4DHcYjK vbtTXjXt3731vuokts1jvq7MGHKdXpKphnugAkbFP90qZceCYH0Vpe+kppr2XIgNy2uG L9jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751355259; x=1751960059; 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=qXfpXT9vFjV4Ijv0D8UWy+lop4TnY9hd5VtpLJWVxXo=; b=PIuNUE3wwGO7NBT50z4UDNrp1b7ShNJKjZKpEXxCMWof/xAMjr/mAG38Jz+anMCJsW +kGBh2J871ljdaF0yCxZNEY8bkcSOafl93aNgdZ8uoLdtGkeSMqnucWHNOKVXIIkQ16W +ZruyNmqepoXiJy6Wodmz3djNXew1bq0yDTyhJeuX1zzNISVc6AZN7F09QZOdtAJn0tj lsRy+CpBgGntQsBVixubmpsgQ2H88bOpxGVf0CvLyMQZKF6yWhodwcAeB0hFtdlkWsvk QozNFflMmcL/hAswBQylzVB+c35LWGa93+GcLYOFS8gBtweyIi4Nke47SU3mH54uDTj9 aZDg== X-Gm-Message-State: AOJu0Yzmd1Nmi9OCLLjY676Z1MC07iR8NYjpXWIdIOSLDVGyfnCVpOQa B+IrljGRadPKVHoFFayTIgK9lq6f4MYmbQEmQpLyX3mvXDy8fOkuCBfSjghAz0LYjhJAWJup+Ev S9JELboo= X-Gm-Gg: ASbGncuc9dzUlyOdhoyk81frhoryYkh17Lgcf/3Q5wyLcMWb6kodmbr06QhM4aNxiLu znmNA0OvwrZlduBVKr52gJGRKqONQ/tjG9n8Q1ROeKO11RbJxvbSOGmaP3ZBMTJVVrLF3IGpyGR jMuSyVdABCt/BF8zLs1W4cYpKXVgX1BYu/c3ja484MqRNcUzINaO0wBDCWT/Cv7Qk89ae7+bk3b 985ftK/r6U5CZq1ZqG7ycje+Rp65bbdaolbY3i8BPWMCyA3/BL4SRJj8ZBCwXXYeYac6iTPjREn UGijL1/SCMAc3uaIptyTnDBw8xRU4Zx1j19KonyJ384U+0JB1zh/uh32yhDg2Nkumht9VykGBPw GHRxPKB/jcw005K/FY879Ig25Ot14ykFjIu029zI= X-Google-Smtp-Source: AGHT+IGrWF23x5qlhJ/2XP1E8r47snZvItFEYy/Ns4GqFxVfPRyKQTATixJcEdrILXi7hAVb4rLEmQ== X-Received: by 2002:a2e:a22b:0:b0:32a:7d61:ded0 with SMTP id 38308e7fff4ca-32cdc5186aamr40590221fa.19.1751355259085; Tue, 01 Jul 2025 00:34:19 -0700 (PDT) Received: from localhost.localdomain (87-100-218-141.bb.dnainternet.fi. [87.100.218.141]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32cd2dead99sm15268581fa.22.2025.07.01.00.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jul 2025 00:34:18 -0700 (PDT) From: Mikko Rapeli To: openembedded-core@lists.openembedded.org Cc: Mikko Rapeli Subject: [PATCH v2 5/6] testexport.bbclass: use image suffix in testexport tar ball name Date: Tue, 1 Jul 2025 10:33:58 +0300 Message-ID: <20250701073359.979368-5-mikko.rapeli@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250701073359.979368-1-mikko.rapeli@linaro.org> References: <20250701073359.979368-1-mikko.rapeli@linaro.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 01 Jul 2025 07:34:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/219552 testexport.tar.gz is image specific. Thus add same image name suffix to the tar ball name. For example genericarm64 machine core-image-minimal image tar ball changes name from testexport.tar.gz to testexport-core-image-minimal-genericarm64.tar.gz This way testexport from multiple images can exists in the same directory. Signed-off-by: Mikko Rapeli --- meta/classes-recipe/testexport.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/testexport.bbclass b/meta/classes-recipe/testexport.bbclass index 843d777e3bb9..3005fc0dfa52 100644 --- a/meta/classes-recipe/testexport.bbclass +++ b/meta/classes-recipe/testexport.bbclass @@ -136,8 +136,12 @@ def copy_needed_files(d, tc): if dir == '__pycache__': shutil.rmtree(os.path.join(subdir, dir)) + image_basename = d.getVar('IMAGE_BASENAME') + image_machine_suffix = d.getVar('IMAGE_MACHINE_SUFFIX') + # Create tar file for common parts of testexport - testexport_create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR")) + testexport_create_tarball(d, "testexport-%s%s.tar.gz" % + (image_basename, image_machine_suffix), d.getVar("TEST_EXPORT_DIR")) # Copy packages needed for runtime testing test_paths = get_runtime_paths(d) @@ -149,7 +153,7 @@ def copy_needed_files(d, tc): export_pkg_dir = os.path.join(d.getVar("TEST_EXPORT_DIR"), "packages") oe.path.copytree(test_pkg_dir, export_pkg_dir) # Create tar file for packages needed by the DUT - testexport_create_tarball(d, "testexport_packages_%s.tar.gz" % d.getVar("MACHINE"), export_pkg_dir) + testexport_create_tarball(d, "testexport_packages%s.tar.gz" % image_machine_suffix, export_pkg_dir) # Copy SDK if d.getVar("TEST_EXPORT_SDK_ENABLED") == "1":