mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
8a941848e7
commit
deffb5f00a
@@ -228,3 +228,15 @@ class skipIfNotArch(OETestDecorator):
|
|||||||
arch = self.case.td['HOST_ARCH']
|
arch = self.case.td['HOST_ARCH']
|
||||||
if arch not in self.archs:
|
if arch not in self.archs:
|
||||||
self.case.skipTest('Test skipped on %s' % arch)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user