oe-selftest: add libdirs from BBPATH to sys.path
This ensures that oeqa.selftest.* from layers are found. [YOCTO #7625] (From OE-Core rev: 182b8ed9f26ed8b6a8eb6dcaec82db9aca14b010) 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>
This commit is contained in:
parent
d2023c34e4
commit
51d760e2a7
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue