summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-02-10 16:25:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-17 14:38:31 +0000
commita07cf2e50c376ce1fdcc9ac77e291595489de3ce (patch)
treed055b0b0e7f356347fb74b60e0593e32e6099f53 /bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
parentd8d0db1701b4ccc0668041f84813c2e4ca57bee9 (diff)
downloadpoky-a07cf2e50c376ce1fdcc9ac77e291595489de3ce.tar.gz
bitbake: toaster: properly detect failed server start
This patch brings in reading the server log if the server fails to start. This is the first step in displaying the errors in a manner that is actionable by the user. [YOCTO #7285] (Bitbake rev: 7f47b67bccff55673a827dbcccc767af4459c933) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/localhostbecontroller.py')
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 005c464314..4814b84afd 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -108,7 +108,7 @@ class LocalhostBEController(BuildEnvironmentController):
108 logger.debug("localhostbecontroller: running the listener at %s" % own_bitbake) 108 logger.debug("localhostbecontroller: running the listener at %s" % own_bitbake)
109 109
110 110
111 cmd = "bash -c \"source %s/oe-init-build-env %s && bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 && DATABASE_URL=%s BBSERVER=0.0.0.0:-1 daemon -d -i -D %s -o toaster_ui.log -- %s --observe-only -u toasterui &\"" % (self.pokydirname, self.be.builddir, 111 cmd = "bash -c \"source %s/oe-init-build-env %s && bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 >toaster_server.log && DATABASE_URL=%s BBSERVER=0.0.0.0:-1 daemon -d -i -D %s -o toaster_ui.log -- %s --observe-only -u toasterui &\"" % (self.pokydirname, self.be.builddir,
112 self.dburl, self.be.builddir, own_bitbake) 112 self.dburl, self.be.builddir, own_bitbake)
113 port = "-1" 113 port = "-1"
114 cmdoutput = self._shellcmd(cmd) 114 cmdoutput = self._shellcmd(cmd)
@@ -290,6 +290,9 @@ class LocalhostBEController(BuildEnvironmentController):
290 self.islayerset = True 290 self.islayerset = True
291 return True 291 return True
292 292
293 def readServerLogFile(self):
294 return open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read()
295
293 def release(self): 296 def release(self):
294 assert self.be.sourcedir and os.path.exists(self.be.builddir) 297 assert self.be.sourcedir and os.path.exists(self.be.builddir)
295 import shutil 298 import shutil