summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2015-07-13 12:04:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 23:29:13 +0100
commit51d760e2a7e22f1b07608fc925da343e56a9ae74 (patch)
treea7acbcef7b12b2c9c60a861c550a8b3ee020e88e /scripts
parentd2023c34e4c3735d919c35d80daf991aab579500 (diff)
downloadpoky-51d760e2a7e22f1b07608fc925da343e56a9ae74.tar.gz
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-selftest7
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