Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: openembedded-core@lists.openembedded.org
Cc: Mikko Rapeli <mikko.rapeli@linaro.org>
Subject: [PATCH v9 09/11] oeqa data.py: add skipIfNotBuildArch decorator
Date: Thu, 17 Oct 2024 11:45:50 +0300	[thread overview]
Message-ID: <20241017084552.182136-10-mikko.rapeli@linaro.org> (raw)
In-Reply-To: <20241017084552.182136-1-mikko.rapeli@linaro.org>

Now tests can be limited to specific build machine
architectures like x86_64 or aarch64.

Needed for tests which work on x86_64 but currently
fail on aarch64 build machines.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta/lib/oeqa/core/decorator/data.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py
index 5444b2cb75..0daf46334f 100644
--- a/meta/lib/oeqa/core/decorator/data.py
+++ b/meta/lib/oeqa/core/decorator/data.py
@@ -228,3 +228,15 @@ class skipIfNotArch(OETestDecorator):
         arch = self.case.td['HOST_ARCH']
         if arch not in self.archs:
              self.case.skipTest('Test skipped on %s' % arch)
+
+@registerDecorator
+class skipIfNotBuildArch(OETestDecorator):
+    """
+    Skip test if BUILD_ARCH is not present in the tuple specified.
+    """
+
+    attrs = ('archs',)
+    def setUpDecorator(self):
+        arch = self.case.td['BUILD_ARCH']
+        if arch not in self.archs:
+             self.case.skipTest('Test skipped on %s' % arch)
-- 
2.34.1



  parent reply	other threads:[~2024-10-17  8:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17  8:45 [PATCH v9 00/11] systemd uki support Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 01/11] uki.bbclass: add class for building Unified Kernel Images (UKI) Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 02/11] wic bootimg-efi.py: keep timestamps and add debug prints Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 03/11] wic bootimg-efi.py: change UKI support from wic plugin to uki.bbclass Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 04/11] oeqa selftest uki.py: add tests for uki.bbclass Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 05/11] oeqa selftest efibootpartition.py: add TEST_RUNQEMUPARAMS to runqemu Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 06/11] oeqa selftest efibootpartition.py: remove systemd-boot from grub-efi test Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 07/11] oeqa selftest wic.py: add TEST_RUNQEMUPARAMS to runqemu Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 08/11] oeqa selftest wic.py: support UKIs via uki.bbclass Mikko Rapeli
2024-10-17  8:45 ` Mikko Rapeli [this message]
2024-10-17  8:45 ` [PATCH v9 10/11] oeqa selftest wic.py: mark efi tests to run on x86_64 build host only Mikko Rapeli
2024-10-17  8:45 ` [PATCH v9 11/11] oeqa selftest wic.py: fix missing ext4 image Mikko Rapeli
2024-10-22 10:26 ` [OE-core] [PATCH v9 00/11] systemd uki support Ross Burton
2024-10-22 19:34   ` Mikko Rapeli
2024-10-22 19:54     ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241017084552.182136-10-mikko.rapeli@linaro.org \
    --to=mikko.rapeli@linaro.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox