* [PATCH] meta/testimage.bbclass: corrected the bug that prevented test cases to be loaded from layers other than meta when using TEST_SUITES = "auto"
@ 2015-06-09 9:44 Costin Constantin
2015-06-09 9:59 ` Robert Yang
0 siblings, 1 reply; 2+ messages in thread
From: Costin Constantin @ 2015-06-09 9:44 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
---
meta/classes/testimage.bbclass | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 4074ff7..aadee45 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -88,19 +88,20 @@ def get_tests_list(d, type="runtime"):
if "auto" in testsuites:
def add_auto_list(path):
- if not os.path.exists(os.path.join(path, '__init__.py')):
- bb.fatal('Tests directory %s exists but is missing __init__.py' % path)
files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')])
for f in files:
module = 'oeqa.' + type + '.' + f[:-3]
if module not in testslist:
testslist.append(module)
-
+ tests_found = False
for p in bbpath:
testpath = os.path.join(p, 'lib', 'oeqa', type)
bb.debug(2, 'Searching for tests in %s' % testpath)
- if os.path.exists(testpath):
+ if os.path.exists(os.path.join(testpath, '__init__.py')):
add_auto_list(testpath)
+ tests_found = True
+ if not tests_found:
+ bb.fatal('Couldn\'t find any test files inside meta*/lib/oeqa/runtime or meta*/lib/oeqa/sdk directories.')
return testslist
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] meta/testimage.bbclass: corrected the bug that prevented test cases to be loaded from layers other than meta when using TEST_SUITES = "auto"
2015-06-09 9:44 [PATCH] meta/testimage.bbclass: corrected the bug that prevented test cases to be loaded from layers other than meta when using TEST_SUITES = "auto" Costin Constantin
@ 2015-06-09 9:59 ` Robert Yang
0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2015-06-09 9:59 UTC (permalink / raw)
To: Costin Constantin, openembedded-core
Hi Costin,
I think that the subject line should be less than 50 characters, usually.
// Robert
On 06/09/2015 05:44 PM, Costin Constantin wrote:
> Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
> ---
> meta/classes/testimage.bbclass | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
> index 4074ff7..aadee45 100644
> --- a/meta/classes/testimage.bbclass
> +++ b/meta/classes/testimage.bbclass
> @@ -88,19 +88,20 @@ def get_tests_list(d, type="runtime"):
>
> if "auto" in testsuites:
> def add_auto_list(path):
> - if not os.path.exists(os.path.join(path, '__init__.py')):
> - bb.fatal('Tests directory %s exists but is missing __init__.py' % path)
> files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')])
> for f in files:
> module = 'oeqa.' + type + '.' + f[:-3]
> if module not in testslist:
> testslist.append(module)
> -
> + tests_found = False
> for p in bbpath:
> testpath = os.path.join(p, 'lib', 'oeqa', type)
> bb.debug(2, 'Searching for tests in %s' % testpath)
> - if os.path.exists(testpath):
> + if os.path.exists(os.path.join(testpath, '__init__.py')):
> add_auto_list(testpath)
> + tests_found = True
> + if not tests_found:
> + bb.fatal('Couldn\'t find any test files inside meta*/lib/oeqa/runtime or meta*/lib/oeqa/sdk directories.')
>
> return testslist
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-09 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-09 9:44 [PATCH] meta/testimage.bbclass: corrected the bug that prevented test cases to be loaded from layers other than meta when using TEST_SUITES = "auto" Costin Constantin
2015-06-09 9:59 ` Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox