summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/decorators.py
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-11-01 12:37:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-05 22:04:28 +0000
commit19aeca1cac9bed7851dd7ee45156d6024ab54498 (patch)
tree3e32fa3b4ca93ccab0da1d8f912256163c3c698d /meta/lib/oeqa/utils/decorators.py
parent90c709da9b3e8d3167a0ecb6ef91f569a70fe285 (diff)
downloadpoky-19aeca1cac9bed7851dd7ee45156d6024ab54498.tar.gz
lib/oeqa: add oeTest superclass
Add oeTest superclass, make oeRuntimeTest inherit that and make the necesarry adjustments. Tests in lib/oeqa/runtime don't change, they still inherit oeRuntimeTest. We should do this because oetest.py in the future can be a base module for more stuff than oeRuntimeTest. (From OE-Core rev: cd4ed41a070bd52c446ac3df8337f17ab9421145) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/decorators.py')
-rw-r--r--meta/lib/oeqa/utils/decorators.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 33fed5a10b..b99da8d76d 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -15,7 +15,7 @@ class skipIfFailure(object):
15 15
16 def __call__(self,f): 16 def __call__(self,f):
17 def wrapped_f(*args): 17 def wrapped_f(*args):
18 if self.testcase in (oeRuntimeTest.testFailures or oeRuntimeTest.testErrors): 18 if self.testcase in (oeTest.testFailures or oeTest.testErrors):
19 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase) 19 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
20 return f(*args) 20 return f(*args)
21 wrapped_f.__name__ = f.__name__ 21 wrapped_f.__name__ = f.__name__
@@ -28,7 +28,7 @@ class skipIfSkipped(object):
28 28
29 def __call__(self,f): 29 def __call__(self,f):
30 def wrapped_f(*args): 30 def wrapped_f(*args):
31 if self.testcase in oeRuntimeTest.testSkipped: 31 if self.testcase in oeTest.testSkipped:
32 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase) 32 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
33 return f(*args) 33 return f(*args)
34 wrapped_f.__name__ = f.__name__ 34 wrapped_f.__name__ = f.__name__
@@ -41,9 +41,9 @@ class skipUnlessPassed(object):
41 41
42 def __call__(self,f): 42 def __call__(self,f):
43 def wrapped_f(*args): 43 def wrapped_f(*args):
44 if self.testcase in oeRuntimeTest.testSkipped or \ 44 if self.testcase in oeTest.testSkipped or \
45 self.testcase in oeRuntimeTest.testFailures or \ 45 self.testcase in oeTest.testFailures or \
46 self.testcase in oeRuntimeTest.testErrors: 46 self.testcase in oeTest.testErrors:
47 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase) 47 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
48 return f(*args) 48 return f(*args)
49 wrapped_f.__name__ = f.__name__ 49 wrapped_f.__name__ = f.__name__