All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: toaster@yoctoproject.org
Subject: [PATCH 16/26] toaster: remove stopBBServer API
Date: Thu, 12 Nov 2015 14:04:39 +0200	[thread overview]
Message-ID: <193b863c7deb81d13db99cb71cf088950f0d0dde.1447328915.git.ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <cover.1447328915.git.ed.bartosh@linux.intel.com>
In-Reply-To: <cover.1447328915.git.ed.bartosh@linux.intel.com>

Removed stopBBServer API from build controller as toaster
doesn't stop bitbake server anymore. It's reused for both
types of builds: triggered by UI and started manually.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 bitbake/lib/toaster/bldcontrol/bbcontroller.py          |  6 ------
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py |  9 ---------
 bitbake/lib/toaster/bldcontrol/sshbecontroller.py       | 10 ----------
 bitbake/lib/toaster/bldcontrol/tests.py                 |  4 ----
 4 files changed, 29 deletions(-)

diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
index ad70ac8..3d98ad7 100644
--- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
@@ -140,12 +140,6 @@ class BuildEnvironmentController(object):
         """
         raise Exception("FIXME: Must override in order to actually start the BB server")
 
-    def stopBBServer(self):
-        """ Stops the currently running BB server.
-            The bbstate MUST be updated to "stopped".
-            self.connection must be none.
-        """
-        raise Exception("FIXME: Must override stoBBServer")
 
     def setLayers(self, bbs, ls):
         """ Checks-out bitbake executor and layers from git repositories.
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index f321537..9ab741f 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -114,15 +114,6 @@ class LocalhostBEController(BuildEnvironmentController):
         self.be.bbstate = BuildEnvironment.SERVER_STARTED
         self.be.save()
 
-    def stopBBServer(self):
-        assert self.pokydirname and os.path.exists(self.pokydirname)
-        assert self.islayerset
-        self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" %
-            (self.pokydirname, self.be.builddir, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)()))
-        self.be.bbstate = BuildEnvironment.SERVER_STOPPED
-        self.be.save()
-        logger.debug("localhostbecontroller: Stopped bitbake server")
-
     def getGitCloneDirectory(self, url, branch):
         """Construct unique clone directory name out of url and branch."""
         if branch != "HEAD":
diff --git a/bitbake/lib/toaster/bldcontrol/sshbecontroller.py b/bitbake/lib/toaster/bldcontrol/sshbecontroller.py
index 8ef434b..17dd66c 100644
--- a/bitbake/lib/toaster/bldcontrol/sshbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/sshbecontroller.py
@@ -98,16 +98,6 @@ class SSHBEController(BuildEnvironmentController):
         self.be.bbstate = BuildEnvironment.SERVER_STARTED
         self.be.save()
 
-    def stopBBServer(self):
-        assert self.pokydirname and self._pathexists(self.pokydirname)
-        assert self.islayerset
-        print self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" %
-            (self.pokydirname, self.be.builddir, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)()))
-        self.be.bbstate = BuildEnvironment.SERVER_STOPPED
-        self.be.save()
-        print "Stopped server"
-
-
     def _copyFile(self, filepath1, filepath2):
         p = subprocess.Popen("scp '%s' '%s'" % (filepath1, filepath2), stdout=subprocess.PIPE, stderr = subprocess.PIPE, shell=True)
         (out, err) = p.communicate()
diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py
index 5dbc77f..f54cf7f 100644
--- a/bitbake/lib/toaster/bldcontrol/tests.py
+++ b/bitbake/lib/toaster/bldcontrol/tests.py
@@ -71,9 +71,6 @@ class BEControllerTests(object):
 
         self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, int(bc.be.bbport))), "Server not answering")
 
-        bc.stopBBServer()
-        self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, int(bc.be.bbport))), "Server not stopped")
-
         self._serverForceStop(bc)
 
     def test_getBBController(self):
@@ -96,7 +93,6 @@ class BEControllerTests(object):
 
         bbc = bc.getBBController()
         self.assertTrue(isinstance(bbc, BitbakeController))
-        bc.stopBBServer()
 
         self._serverForceStop(bc)
 
-- 
2.1.4



  parent reply	other threads:[~2015-11-12 12:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 11:55 [PATCH v4 00/26] toaster: 8279: Provide a single way of starting Toaster Ed Bartosh
2015-11-12 11:55 ` [PATCH 01/26] toaster: don't allow to run toaster as a script Ed Bartosh
2015-11-12 11:55 ` [PATCH 02/26] toaster: implement get-dburl command Ed Bartosh
2015-11-12 11:55 ` [PATCH 03/26] toaster: set DATABASE_URL in toaster script Ed Bartosh
2015-11-12 11:55 ` [PATCH 04/26] toaster: run bitbake the same way Ed Bartosh
2015-11-12 11:55 ` [PATCH 05/26] toaster: remove unused variable Ed Bartosh
2015-11-12 11:55 ` [PATCH 06/26] toaster: check for toaster configuration later Ed Bartosh
2015-11-12 11:55 ` [PATCH 07/26] toaster: use parent of the build dir Ed Bartosh
2015-11-12 11:55 ` [PATCH 08/26] toaster: make runbuilds to loop Ed Bartosh
2015-11-12 12:04 ` [PATCH 09/26] toaster: start 'manage.py runbuilds' in the script Ed Bartosh
2015-11-12 12:04 ` [PATCH 10/26] toaster: update brbe and project attributes Ed Bartosh
2015-11-12 12:04 ` [PATCH 11/26] toaster: implement stop_bitbake function Ed Bartosh
2015-11-12 12:04 ` [PATCH 12/26] toaster: implement start_bitbake function Ed Bartosh
2015-11-12 12:04 ` [PATCH 13/26] toaster: implement 'toaster restart-bitbake' Ed Bartosh
2015-11-12 12:04 ` [PATCH 14/26] toaster: remove _setupBE function Ed Bartosh
2015-11-12 12:04 ` [PATCH 15/26] toaster: reimplemented startBBServer method Ed Bartosh
2015-11-12 12:04 ` Ed Bartosh [this message]
2015-11-12 12:04 ` [PATCH 17/26] toaster: do not terminate bb server Ed Bartosh
2015-11-12 12:04 ` [PATCH 18/26] toaster: remove usage of BUILD_MODE variable Ed Bartosh
2015-11-12 12:04 ` [PATCH 19/26] toaster: do not create duplicate HelpText objects Ed Bartosh
2015-11-12 12:04 ` [PATCH 20/26] toaster: buildinfohelper Broaden the toaster created recipe data case Ed Bartosh
2015-11-12 12:04 ` [PATCH 21/26] toaster: implement BitbakeController.getVariable Ed Bartosh
2015-11-12 12:04 ` [PATCH 22/26] toaster: set varibales on bitbake server Ed Bartosh
2015-11-12 12:04 ` [PATCH 23/26] toaster: remove writeConfFile API Ed Bartosh
2015-11-12 12:04 ` [PATCH 24/26] toaster: stop using toaster-pre.conf Ed Bartosh
2015-11-12 12:04 ` [PATCH 25/26] toaster: remove SDKMACHINE from project variables Ed Bartosh
2015-11-12 12:04 ` [PATCH 26/26] toaster: get rid of complicated heuristics Ed Bartosh
2015-11-16 18:40 ` [PATCH v4 00/26] toaster: 8279: Provide a single way of starting Toaster Brian Avery

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=193b863c7deb81d13db99cb71cf088950f0d0dde.1447328915.git.ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=toaster@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.