From: Christopher Larson Date: Mon, 13 Jul 2015 19:04:21 +0000 (-0700) Subject: oe-selftest: add libdirs from BBPATH to sys.path X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~29606 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=182b8ed9f26ed8b6a8eb6dcaec82db9aca14b010;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Ross Burton --- diff --git a/scripts/oe-selftest b/scripts/oe-selftest index c19c6928b42..60f9bb88f51 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest @@ -155,6 +155,13 @@ def main(): parser = get_args_parser() args = parser.parse_args() + # Add /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