* [PATCH 0/1] Fix for oe-selftest failure
@ 2015-10-26 13:28 Paul Eggleton
2015-10-26 13:28 ` [PATCH 1/1] oeqa/utils/decorators: fix missing keyword arguments on decorators Paul Eggleton
0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2015-10-26 13:28 UTC (permalink / raw)
To: openembedded-core
Fix an oe-selftest failure seen testing master-next on the Yocto
Project autobuilder.
The following changes since commit 73f8a0bf3b99d480bf97e266da0fb048714b4caf:
build-appliance-image: Update to jethro head revision (2015-10-21 23:13:03 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/deco-fix
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/deco-fix
Paul Eggleton (1):
oeqa/utils/decorators: fix missing keyword arguments on decorators
meta/lib/oeqa/utils/decorators.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] oeqa/utils/decorators: fix missing keyword arguments on decorators
2015-10-26 13:28 [PATCH 0/1] Fix for oe-selftest failure Paul Eggleton
@ 2015-10-26 13:28 ` Paul Eggleton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2015-10-26 13:28 UTC (permalink / raw)
To: openembedded-core
We need to handle keyword arguments here or sending a keyword argument
to a decorated function that accepts keyword arguments will trigger an
error. (This showed up when testcase decorators were added to the
recipetool.RecipetoolTests.test_recipetool_appendsrcfiles_basic_subdir
test).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/lib/oeqa/utils/decorators.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 2169a20..0d79223 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -57,11 +57,11 @@ class skipIfFailure(object):
self.testcase = testcase
def __call__(self,f):
- def wrapped_f(*args):
+ def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in (res.getFailList() or res.getErrorList()):
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
- return f(*args)
+ return f(*args, **kwargs)
wrapped_f.__name__ = f.__name__
return wrapped_f
@@ -71,11 +71,11 @@ class skipIfSkipped(object):
self.testcase = testcase
def __call__(self,f):
- def wrapped_f(*args):
+ def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in res.getSkipList():
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
- return f(*args)
+ return f(*args, **kwargs)
wrapped_f.__name__ = f.__name__
return wrapped_f
@@ -85,13 +85,13 @@ class skipUnlessPassed(object):
self.testcase = testcase
def __call__(self,f):
- def wrapped_f(*args):
+ def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in res.getSkipList() or \
self.testcase in res.getFailList() or \
self.testcase in res.getErrorList():
raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
- return f(*args)
+ return f(*args, **kwargs)
wrapped_f.__name__ = f.__name__
wrapped_f._depends_on = self.testcase
return wrapped_f
@@ -102,8 +102,8 @@ class testcase(object):
self.test_case = test_case
def __call__(self, func):
- def wrapped_f(*args):
- return func(*args)
+ def wrapped_f(*args, **kwargs):
+ return func(*args, **kwargs)
wrapped_f.test_case = self.test_case
wrapped_f.__name__ = func.__name__
return wrapped_f
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-26 13:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-26 13:28 [PATCH 0/1] Fix for oe-selftest failure Paul Eggleton
2015-10-26 13:28 ` [PATCH 1/1] oeqa/utils/decorators: fix missing keyword arguments on decorators Paul Eggleton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox