diff options
| -rw-r--r-- | meta/lib/oeqa/core/decorator/data.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py index 3ce10e5499..de881e097a 100644 --- a/meta/lib/oeqa/core/decorator/data.py +++ b/meta/lib/oeqa/core/decorator/data.py | |||
| @@ -194,3 +194,27 @@ class skipIfQemu(OETestDecorator): | |||
| 194 | self.logger.debug("Checking if qemu MACHINE") | 194 | self.logger.debug("Checking if qemu MACHINE") |
| 195 | if self.case.td.get('MACHINE', '').startswith('qemu'): | 195 | if self.case.td.get('MACHINE', '').startswith('qemu'): |
| 196 | self.case.skipTest('Test only runs on real hardware') | 196 | self.case.skipTest('Test only runs on real hardware') |
| 197 | |||
| 198 | @registerDecorator | ||
| 199 | class skipIfArch(OETestDecorator): | ||
| 200 | """ | ||
| 201 | Skip test if HOST_ARCH is present in the tuple specified. | ||
| 202 | """ | ||
| 203 | |||
| 204 | attrs = ('archs',) | ||
| 205 | def setUpDecorator(self): | ||
| 206 | arch = self.case.td['HOST_ARCH'] | ||
| 207 | if arch in self.archs: | ||
| 208 | self.case.skipTest('Test skipped on %s' % arch) | ||
| 209 | |||
| 210 | @registerDecorator | ||
| 211 | class skipIfNotArch(OETestDecorator): | ||
| 212 | """ | ||
| 213 | Skip test if HOST_ARCH is not present in the tuple specified. | ||
| 214 | """ | ||
| 215 | |||
| 216 | attrs = ('archs',) | ||
| 217 | def setUpDecorator(self): | ||
| 218 | arch = self.case.td['HOST_ARCH'] | ||
| 219 | if arch not in self.archs: | ||
| 220 | self.case.skipTest('Test skipped on %s' % arch) | ||
