To limit tests to specific build host architectures.
For example KVM testing will only work if target and
build architectures are the same.
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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)