From: Christopher Larson Date: Mon, 13 Jul 2015 18:53:16 +0000 (-0700) Subject: oe-selftest: obey oeqa.selftest.__path__ X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~29607 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c60cbced7b101ee52ce4a0a0bce542fd38f1821;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Ross Burton --- diff --git a/scripts/oe-selftest b/scripts/oe-selftest index fa6245a3a6c..c19c6928b42 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