Browse Source

oe-selftest: add scripts/lib and bitbake/lib to path

In particular, this allows us to use code from bitbake's bb module
(such as tinfoil).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Paul Eggleton 9 years ago
parent
commit
5ca91cd0b5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      scripts/oe-selftest

+ 4 - 1
scripts/oe-selftest

@@ -31,7 +31,10 @@ import unittest
 import logging
 import argparse
 
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'meta/lib')))
+sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib')
+import scriptpath
+scriptpath.add_bitbake_lib_path()
+scriptpath.add_oe_lib_path()
 
 import oeqa.selftest
 import oeqa.utils.ftools as ftools