]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/runtime: search sys.path explicitly for modules
authorRoss Burton <ross@burtonini.com>
Wed, 20 Oct 2021 17:30:07 +0000 (18:30 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Nov 2021 11:17:55 +0000 (11:17 +0000)
commitf2736f9a1156e23efbb20ea44a4aa81775ccbeba
treef98f6899c72d542dc6acf9e24b268f5d81fafe93
parentd187bedad37eb4d75c84144148ac58b146ddba9e
oeqa/runtime: search sys.path explicitly for modules

The controller module loading code needs to be told what directories
to search for modules via the target_modules_path keyword argument, which
is set to BBPATH.

However, as the actual module loading is done via importlib this relies
on the paths being on sys.path, which it is as base.bbclass puts each
layer's lib/ in sys.path.

Simplify the code by removing this indirection, and simply search
sys.path directly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 570a19581f582f77e04d6892adb647cd649a6943)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/runtime/context.py