summaryrefslogtreecommitdiffstats
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 23:29:13 +0100
commitd2023c34e4c3735d919c35d80daf991aab579500 (patch)
tree2b03ff1a903178ddd57d3422822652d9a134a618 /scripts/oe-selftest
parent0eb40ba0de4c063ac5dcbc71b0de8e8e2cd5aa17 (diff)
downloadpoky-d2023c34e4c3735d919c35d80daf991aab579500.tar.gz
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] (From OE-Core rev: 3c60cbced7b101ee52ce4a0a0bce542fd38f1821) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):
142 for x in exclusive_modules: 142 for x in exclusive_modules:
143 testslist.append('oeqa.selftest.' + x) 143 testslist.append('oeqa.selftest.' + x)
144 if not testslist: 144 if not testslist:
145 testpath = os.path.abspath(os.path.dirname(oeqa.selftest.__file__)) 145 for testpath in oeqa.selftest.__path__:
146 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']) 146 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'])
147 for f in files: 147 for f in files:
148 module = 'oeqa.selftest.' + f[:-3] 148 module = 'oeqa.selftest.' + f[:-3]
149 testslist.append(module) 149 if module not in testslist:
150 testslist.append(module)
150 151
151 return testslist 152 return testslist
152 153