diff options
Diffstat (limited to 'scripts/oe-selftest')
-rwxr-xr-x | scripts/oe-selftest | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest index c19c6928b4..60f9bb88f5 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest | |||
@@ -155,6 +155,13 @@ def main(): | |||
155 | parser = get_args_parser() | 155 | parser = get_args_parser() |
156 | args = parser.parse_args() | 156 | args = parser.parse_args() |
157 | 157 | ||
158 | # Add <layer>/lib to sys.path, so layers can add selftests | ||
159 | log.info("Running bitbake -e to get BBPATH") | ||
160 | bbpath = get_bb_var('BBPATH').split(':') | ||
161 | layer_libdirs = [p for p in (os.path.join(l, 'lib') for l in bbpath) if os.path.exists(p)] | ||
162 | sys.path.extend(layer_libdirs) | ||
163 | reload(oeqa.selftest) | ||
164 | |||
158 | if args.list_allclasses: | 165 | if args.list_allclasses: |
159 | args.list_modules = True | 166 | args.list_modules = True |
160 | 167 | ||