summaryrefslogtreecommitdiff
path: root/scripts/oe-selftest
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2015-07-13 11:53:16 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 12:28:12 +0100
commit3c60cbced7b101ee52ce4a0a0bce542fd38f1821 (patch)
tree5262837247061980edb6d4b70b6f208a2bfa35cf /scripts/oe-selftest
parentf9bc3b27244a141ec7273445d3ea139a047e0ddf (diff)
downloadopenembedded-core-3c60cbced7b101ee52ce4a0a0bce542fd38f1821.tar.gz
openembedded-core-3c60cbced7b101ee52ce4a0a0bce542fd38f1821.tar.bz2
openembedded-core-3c60cbced7b101ee52ce4a0a0bce542fd38f1821.zip
oe-selftest: obey oeqa.selftest.__path__
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>
Diffstat (limited to 'scripts/oe-selftest')
-rwxr-xr-xscripts/oe-selftest11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index fa6245a3a6..c19c6928b4 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -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