]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-selftest: obey oeqa.selftest.__path__
authorChristopher Larson <chris_larson@mentor.com>
Mon, 13 Jul 2015 18:53:16 +0000 (11:53 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jul 2015 11:28:12 +0000 (12:28 +0100)
This ensures that all paths that hold selftest tests will be checked
(oeqa.selftest is a namespace package).

[YOCTO #7625]

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/oe-selftest

index fa6245a3a6c2d58e8fd5fdb21be1f86803913e2f..c19c6928b42b886128b387a6b36477bf07276c41 100755 (executable)
@@ -142,11 +142,12 @@ def get_tests(exclusive_modules=[], include_hidden=False):
     for x in exclusive_modules:
         testslist.append('oeqa.selftest.' + x)
     if not testslist:
-        testpath = os.path.abspath(os.path.dirname(oeqa.selftest.__file__))
-        files = sorted([f for f in os.listdir(testpath) if f.endswith('.py') and not (f.startswith('_') and not include_hidden) and not f.startswith('__') and f != 'base.py'])
-        for f in files:
-            module = 'oeqa.selftest.' + f[:-3]
-            testslist.append(module)
+        for testpath in oeqa.selftest.__path__:
+            files = sorted([f for f in os.listdir(testpath) if f.endswith('.py') and not (f.startswith('_') and not include_hidden) and not f.startswith('__') and f != 'base.py'])
+            for f in files:
+                module = 'oeqa.selftest.' + f[:-3]
+                if module not in testslist:
+                    testslist.append(module)
 
     return testslist