[OE-core] [PATCHv3 15/30] oeqa/selftest/case: Support bitbake memres mode in per build directory
Aníbal Limón
anibal.limon at linux.intel.com
Mon Jul 17 21:45:23 UTC 2017
If BBSERVER is set on the environment the bitbake is set to be used
as a memres, so starts an bitbake server per TestClass.
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
meta/lib/oeqa/selftest/case.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index c6f2d184ea3..d98a3760415 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -97,6 +97,12 @@ class OESelftestTestCase(OETestCase):
cls.runCmd("git init; git add *; git commit -a -m 'initial'",
cwd=cls.testlayer_path)
+ if cls._use_own_builddir and 'BBSERVER' in os.environ:
+ env = os.environ.copy()
+ del env['BBSERVER']
+ result = cls.runCmd('bitbake --server-only -t xmlrpc -B localhost:-1',
+ env=env)
+
# XXX: sometimes meta-selftest isn't on bblayers at first backup
try:
cls.runCmd("bitbake-layers remove-layer %s" % cls.orig_testlayer_path)
@@ -119,6 +125,9 @@ class OESelftestTestCase(OETestCase):
@classmethod
def tearDownClass(cls):
+ if cls._use_own_builddir and 'BBSERVER' in os.environ:
+ cls.runCmd('bitbake --kill-server')
+
cls.remove_include()
cls.remove_inc_files()
super(OESelftestTestCase, cls).tearDownClass()
--
2.11.0
More information about the Openembedded-core
mailing list