From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/7] oeqa/utils: fix testcase decorator to allow calling tests individually
Date: Tue, 23 Dec 2014 16:08:43 +0000 [thread overview]
Message-ID: <15a4e2d715fab1e8c9a8c8ff4af3d82da41818ed.1419350817.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1419350817.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1419350817.git.paul.eggleton@linux.intel.com>
Without this, running tests individually failed with a traceback:
$ oe-selftest --run-test
buildoptions.ImageOptionsTests.test_incremental_image_generation
2014-12-23 14:40:37,636 - selftest - INFO - Checking that everything is in order before running the tests
2014-12-23 14:40:38,408 - selftest - INFO - Running bitbake -p
2014-12-23 14:40:40,235 - selftest - INFO - Loading tests from:
oeqa.selftest.buildoptions.ImageOptionsTests.test_incremental_image_generation
Traceback (most recent call last):
File "/home/user/poky/scripts/oe-selftest", line 179, in <module>
ret = main()
File "/home/user/poky/scripts/oe-selftest", line 164, in main
suite.addTests(loader.loadTestsFromName(test))
File "/usr/lib64/python2.7/unittest/loader.py", line 91, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File "/home/user/poky/meta/lib/oeqa/selftest/buildoptions.py", line 12, in <module>
class ImageOptionsTests(oeSelfTest):
File "/home/user/poky/meta/lib/oeqa/selftest/buildoptions.py", line 14, in ImageOptionsTests
@testcase(761)
NameError: global name 'func' is not defined
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/lib/oeqa/utils/decorators.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 1ae1162..2d5db24 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -89,6 +89,7 @@ class testcase(object):
def wrapped_f(*args):
return func(*args)
wrapped_f.test_case = self.test_case
+ wrapped_f.__name__ = func.__name__
return wrapped_f
class NoParsingFilter(logging.Filter):
--
1.9.3
next prev parent reply other threads:[~2014-12-23 16:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-23 16:08 [PATCH 0/7] oe-selftest QA test fixes Paul Eggleton
2014-12-23 16:08 ` [PATCH 1/7] oeqa/utils: replace some tabs with spaces Paul Eggleton
2014-12-23 16:08 ` Paul Eggleton [this message]
2014-12-23 16:08 ` [PATCH 3/7] oeqa/selftest: fix test_event_handler for changes in bitbake output Paul Eggleton
2014-12-23 16:08 ` [PATCH 4/7] oeqa/selftest: skip test_incremental_image_generation if not using rpm Paul Eggleton
2014-12-23 16:08 ` [PATCH 5/7] oeqa/selftest: improve failure messages for devtool tests Paul Eggleton
2014-12-23 16:08 ` [PATCH 6/7] oeqa/selftest: populate pkgdata/shlibs in test_recipetool_create_git Paul Eggleton
2014-12-23 16:08 ` [PATCH 7/7] oeqa/selftest: fix test_force_task so it doesn't taint the entire build Paul Eggleton
2014-12-23 16:20 ` Paul Eggleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15a4e2d715fab1e8c9a8c8ff4af3d82da41818ed.1419350817.git.paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox