aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-14 09:26:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-15 09:06:00 +0100
commitbb44e5b99d7b8ef7a174c72e8c42c2591da7f539 (patch)
treee3c17f1094e683c5ddc344dfb96e07e5678dcecf /meta/lib/oeqa/utils
parent7a93223483a028b60a8b8e3b81ff673d93bec046 (diff)
downloadopenembedded-core-contrib-bb44e5b99d7b8ef7a174c72e8c42c2591da7f539.tar.gz
oeqa/decorators: Use wraps consistently
We want the decorator to leave the function names of the test unchanged. Some decorators are already using wraps for this but not all. Fix this to be consistent allowing inspection of the test to give the wanted values. (From OE-Core rev: 9e4d60b29ff5667d23a89953ce7139b34c11d40b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r--meta/lib/oeqa/utils/decorators.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 0d79223a29..d52f326f1a 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -57,6 +57,7 @@ class skipIfFailure(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in (res.getFailList() or res.getErrorList()):
@@ -71,6 +72,7 @@ class skipIfSkipped(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in res.getSkipList():
@@ -85,6 +87,7 @@ class skipUnlessPassed(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in res.getSkipList() or \
@@ -97,11 +100,11 @@ class skipUnlessPassed(object):
return wrapped_f
class testcase(object):
-
def __init__(self, test_case):
self.test_case = test_case
def __call__(self, func):
+ @wraps(func)
def wrapped_f(*args, **kwargs):
return func(*args, **kwargs)
wrapped_f.test_case = self.test_case