diff options
author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2025-06-03 15:29:38 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-05 11:02:22 +0100 |
commit | deffb5f00a08c0d3b6681aa97f403f173fc9794f (patch) | |
tree | 469538d1c8125dcbc4f5f0605c721011ad5cc853 | |
parent | 8a941848e7519f693c51b129be9a66f19bbf8124 (diff) | |
download | poky-deffb5f00a08c0d3b6681aa97f403f173fc9794f.tar.gz |
oeqa decorator/data.py: add skipIfNotBuildArch decorator
To limit tests to specific build host architectures.
For example KVM testing will only work if target and
build architectures are the same.
(From OE-Core rev: c59b74b8bfd3b351a31204f33e00351ad5e5b657)
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/core/decorator/data.py | 12 |
1 files changed, 12 insertions, 0 deletions
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): | |||
228 | arch = self.case.td['HOST_ARCH'] | 228 | arch = self.case.td['HOST_ARCH'] |
229 | if arch not in self.archs: | 229 | if arch not in self.archs: |
230 | self.case.skipTest('Test skipped on %s' % arch) | 230 | self.case.skipTest('Test skipped on %s' % arch) |
231 | |||
232 | @registerDecorator | ||
233 | class skipIfNotBuildArch(OETestDecorator): | ||
234 | """ | ||
235 | Skip test if BUILD_ARCH is not present in the tuple specified. | ||
236 | """ | ||
237 | |||
238 | attrs = ('archs',) | ||
239 | def setUpDecorator(self): | ||
240 | arch = self.case.td['BUILD_ARCH'] | ||
241 | if arch not in self.archs: | ||
242 | self.case.skipTest('Test skipped on %s' % arch) | ||