diff options
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/core/decorator/data.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py index 31c6dd6be7..f0f65abb39 100644 --- a/meta/lib/oeqa/core/decorator/data.py +++ b/meta/lib/oeqa/core/decorator/data.py | |||
@@ -54,6 +54,20 @@ class skipIfNotDataVar(OETestDecorator): | |||
54 | self.case.skipTest(self.msg) | 54 | self.case.skipTest(self.msg) |
55 | 55 | ||
56 | @registerDecorator | 56 | @registerDecorator |
57 | class skipIfInDataVar(OETestDecorator): | ||
58 | """ | ||
59 | Skip test if value is in data store's variable. | ||
60 | """ | ||
61 | |||
62 | attrs = ('var', 'value', 'msg') | ||
63 | def setUpDecorator(self): | ||
64 | msg = ('Checking if %r value contains %r to skip ' | ||
65 | 'the test' % (self.var, self.value)) | ||
66 | self.logger.debug(msg) | ||
67 | if self.value in (self.case.td.get(self.var)): | ||
68 | self.case.skipTest(self.msg) | ||
69 | |||
70 | @registerDecorator | ||
57 | class skipIfNotInDataVar(OETestDecorator): | 71 | class skipIfNotInDataVar(OETestDecorator): |
58 | """ | 72 | """ |
59 | Skip test if value is not in data store's variable. | 73 | Skip test if value is not in data store's variable. |