[Toaster] [PATCH v3 14/15] toaster: stop bitbake server after the build

Ed Bartosh ed.bartosh at linux.intel.com
Fri Mar 11 00:06:36 PST 2016


Bitbake server is used only during the build. There is no need
in keeping server running after the build.

Running bitbake -m in the subshell after the build should stop
the server.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 8291997..ca96ae8 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -315,11 +315,13 @@ class LocalhostBEController(BuildEnvironmentController):
                 task = 'do_' + task
             bbtargets += '%s:%s ' % (target.target, task)
 
-        # run build with local bitbake
+        # run build with local bitbake. stop the server after the build.
         log = os.path.join(builddir, 'toaster_ui.log')
-        self._shellcmd('TOASTER_BRBE="%s" BBSERVER="0.0.0.0:-1" '
-                       '../bitbake/bin/bitbake %s -u toasterui '
-                       '>>%s 2>&1 &' % (brbe, bbtargets, log), builddir)
+        self._shellcmd(['(TOASTER_BRBE="%s" BBSERVER="0.0.0.0:-1" '
+                        '../bitbake/bin/bitbake %s -u toasterui >>%s 2>&1;'
+                        'BITBAKE_UI="" BBSERVER=0.0.0.0:-1 %s -m)&' \
+                        % (brbe, bbtargets, log, bitbake)], builddir,
+                        nowait=True)
 
         logger.debug('localhostbecontroller: Build launched, exiting. '
                      'Follow build logs at %s' % log)
-- 
2.1.4



More information about the toaster mailing list