summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/utils/decorators.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 2169a20884..0d79223a29 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -57,11 +57,11 @@ class skipIfFailure(object):
57 self.testcase = testcase 57 self.testcase = testcase
58 58
59 def __call__(self,f): 59 def __call__(self,f):
60 def wrapped_f(*args): 60 def wrapped_f(*args, **kwargs):
61 res = getResults() 61 res = getResults()
62 if self.testcase in (res.getFailList() or res.getErrorList()): 62 if self.testcase in (res.getFailList() or res.getErrorList()):
63 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase) 63 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
64 return f(*args) 64 return f(*args, **kwargs)
65 wrapped_f.__name__ = f.__name__ 65 wrapped_f.__name__ = f.__name__
66 return wrapped_f 66 return wrapped_f
67 67
@@ -71,11 +71,11 @@ class skipIfSkipped(object):
71 self.testcase = testcase 71 self.testcase = testcase
72 72
73 def __call__(self,f): 73 def __call__(self,f):
74 def wrapped_f(*args): 74 def wrapped_f(*args, **kwargs):
75 res = getResults() 75 res = getResults()
76 if self.testcase in res.getSkipList(): 76 if self.testcase in res.getSkipList():
77 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase) 77 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
78 return f(*args) 78 return f(*args, **kwargs)
79 wrapped_f.__name__ = f.__name__ 79 wrapped_f.__name__ = f.__name__
80 return wrapped_f 80 return wrapped_f
81 81
@@ -85,13 +85,13 @@ class skipUnlessPassed(object):
85 self.testcase = testcase 85 self.testcase = testcase
86 86
87 def __call__(self,f): 87 def __call__(self,f):
88 def wrapped_f(*args): 88 def wrapped_f(*args, **kwargs):
89 res = getResults() 89 res = getResults()
90 if self.testcase in res.getSkipList() or \ 90 if self.testcase in res.getSkipList() or \
91 self.testcase in res.getFailList() or \ 91 self.testcase in res.getFailList() or \
92 self.testcase in res.getErrorList(): 92 self.testcase in res.getErrorList():
93 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase) 93 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
94 return f(*args) 94 return f(*args, **kwargs)
95 wrapped_f.__name__ = f.__name__ 95 wrapped_f.__name__ = f.__name__
96 wrapped_f._depends_on = self.testcase 96 wrapped_f._depends_on = self.testcase
97 return wrapped_f 97 return wrapped_f
@@ -102,8 +102,8 @@ class testcase(object):
102 self.test_case = test_case 102 self.test_case = test_case
103 103
104 def __call__(self, func): 104 def __call__(self, func):
105 def wrapped_f(*args): 105 def wrapped_f(*args, **kwargs):
106 return func(*args) 106 return func(*args, **kwargs)
107 wrapped_f.test_case = self.test_case 107 wrapped_f.test_case = self.test_case
108 wrapped_f.__name__ = func.__name__ 108 wrapped_f.__name__ = func.__name__
109 return wrapped_f 109 return wrapped_f