diff options
author | Christopher Larson <chris_larson@mentor.com> | 2015-07-13 12:04:21 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-27 12:28:12 +0100 |
commit | 182b8ed9f26ed8b6a8eb6dcaec82db9aca14b010 (patch) | |
tree | 8da6a0e1876cfaeeb01c61be32f2dad6cb6afbb8 | |
parent | 3c60cbced7b101ee52ce4a0a0bce542fd38f1821 (diff) | |
download | openembedded-core-182b8ed9f26ed8b6a8eb6dcaec82db9aca14b010.tar.gz openembedded-core-182b8ed9f26ed8b6a8eb6dcaec82db9aca14b010.tar.bz2 openembedded-core-182b8ed9f26ed8b6a8eb6dcaec82db9aca14b010.zip |
oe-selftest: add libdirs from BBPATH to sys.path
This ensures that oeqa.selftest.* from layers are found.
[YOCTO #7625]
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-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(): parser = get_args_parser() args = parser.parse_args() + # Add <layer>/lib to sys.path, so layers can add selftests + log.info("Running bitbake -e to get BBPATH") + bbpath = get_bb_var('BBPATH').split(':') + layer_libdirs = [p for p in (os.path.join(l, 'lib') for l in bbpath) if os.path.exists(p)] + sys.path.extend(layer_libdirs) + reload(oeqa.selftest) + if args.list_allclasses: args.list_modules = True |