diff options
| -rw-r--r-- | meta/lib/oeqa/core/decorator/data.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py index babc9789d6..12d462f202 100644 --- a/meta/lib/oeqa/core/decorator/data.py +++ b/meta/lib/oeqa/core/decorator/data.py | |||
| @@ -113,3 +113,21 @@ class skipIfNotFeature(OETestDecorator): | |||
| 113 | self.logger.debug(msg) | 113 | self.logger.debug(msg) |
| 114 | if not has_feature(self.case.td, self.value): | 114 | if not has_feature(self.case.td, self.value): |
| 115 | self.case.skipTest(self.msg) | 115 | self.case.skipTest(self.msg) |
| 116 | |||
| 117 | @registerDecorator | ||
| 118 | class skipIfFeature(OETestDecorator): | ||
| 119 | """ | ||
| 120 | Skip test based on DISTRO_FEATURES. | ||
| 121 | |||
| 122 | value must not be in distro features or it will skip the test | ||
| 123 | with msg as the reason. | ||
| 124 | """ | ||
| 125 | |||
| 126 | attrs = ('value', 'msg') | ||
| 127 | |||
| 128 | def setUpDecorator(self): | ||
| 129 | msg = ('Checking if %s is not in DISTRO_FEATURES ' | ||
| 130 | 'or IMAGE_FEATURES' % (self.value)) | ||
| 131 | self.logger.debug(msg) | ||
| 132 | if has_feature(self.case.td, self.value): | ||
| 133 | self.case.skipTest(self.msg) | ||
