mirror of
https://git.yoctoproject.org/poky
synced 2026-02-11 19:23:03 +01:00
oeqa/core/decorator: add skipIfInDataVar
skipIfInDataVar will skip a test if a value is in a certain variable. (From OE-Core rev: 10b935c713748346aea6c36c2f41e0ae6c320821) Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6185e3d23c
commit
a0de8a6fb8
@@ -53,6 +53,20 @@ class skipIfNotDataVar(OETestDecorator):
|
||||
if not self.case.td.get(self.var) == self.value:
|
||||
self.case.skipTest(self.msg)
|
||||
|
||||
@registerDecorator
|
||||
class skipIfInDataVar(OETestDecorator):
|
||||
"""
|
||||
Skip test if value is in data store's variable.
|
||||
"""
|
||||
|
||||
attrs = ('var', 'value', 'msg')
|
||||
def setUpDecorator(self):
|
||||
msg = ('Checking if %r value contains %r to skip '
|
||||
'the test' % (self.var, self.value))
|
||||
self.logger.debug(msg)
|
||||
if self.value in (self.case.td.get(self.var)):
|
||||
self.case.skipTest(self.msg)
|
||||
|
||||
@registerDecorator
|
||||
class skipIfNotInDataVar(OETestDecorator):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user