diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-12-02 10:02:48 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-07 17:37:09 +0000 |
commit | 58765a8719ac999284c15cd376453ac224f57609 (patch) | |
tree | e6f71b466ac7d3cff451a7d7e7ea4d42ebf7daa1 /bitbake | |
parent | 95a3cf75495b25832a81d3ffa006cf3b0c980b2d (diff) | |
download | poky-58765a8719ac999284c15cd376453ac224f57609.tar.gz |
bitbake: toaster: remove stopBBServer API
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.
(Bitbake rev: 0cad802da171d51814f22cc9383f496a63cd0c75)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/bbcontroller.py | 6 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 9 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/sshbecontroller.py | 10 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/tests.py | 4 |
4 files changed, 0 insertions, 29 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py index ad70ac8b54..3d98ad7e1e 100644 --- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py +++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py | |||
@@ -140,12 +140,6 @@ class BuildEnvironmentController(object): | |||
140 | """ | 140 | """ |
141 | raise Exception("FIXME: Must override in order to actually start the BB server") | 141 | raise Exception("FIXME: Must override in order to actually start the BB server") |
142 | 142 | ||
143 | def stopBBServer(self): | ||
144 | """ Stops the currently running BB server. | ||
145 | The bbstate MUST be updated to "stopped". | ||
146 | self.connection must be none. | ||
147 | """ | ||
148 | raise Exception("FIXME: Must override stoBBServer") | ||
149 | 143 | ||
150 | def setLayers(self, bbs, ls): | 144 | def setLayers(self, bbs, ls): |
151 | """ Checks-out bitbake executor and layers from git repositories. | 145 | """ 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 44a9136733..19afb1ada5 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
@@ -113,15 +113,6 @@ class LocalhostBEController(BuildEnvironmentController): | |||
113 | self.be.bbstate = BuildEnvironment.SERVER_STARTED | 113 | self.be.bbstate = BuildEnvironment.SERVER_STARTED |
114 | self.be.save() | 114 | self.be.save() |
115 | 115 | ||
116 | def stopBBServer(self): | ||
117 | assert self.pokydirname and os.path.exists(self.pokydirname) | ||
118 | assert self.islayerset | ||
119 | self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" % | ||
120 | (self.pokydirname, self.be.builddir, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)())) | ||
121 | self.be.bbstate = BuildEnvironment.SERVER_STOPPED | ||
122 | self.be.save() | ||
123 | logger.debug("localhostbecontroller: Stopped bitbake server") | ||
124 | |||
125 | def getGitCloneDirectory(self, url, branch): | 116 | def getGitCloneDirectory(self, url, branch): |
126 | """Construct unique clone directory name out of url and branch.""" | 117 | """Construct unique clone directory name out of url and branch.""" |
127 | if branch != "HEAD": | 118 | if branch != "HEAD": |
diff --git a/bitbake/lib/toaster/bldcontrol/sshbecontroller.py b/bitbake/lib/toaster/bldcontrol/sshbecontroller.py index 8ef434baf5..17dd66c3bc 100644 --- a/bitbake/lib/toaster/bldcontrol/sshbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/sshbecontroller.py | |||
@@ -98,16 +98,6 @@ class SSHBEController(BuildEnvironmentController): | |||
98 | self.be.bbstate = BuildEnvironment.SERVER_STARTED | 98 | self.be.bbstate = BuildEnvironment.SERVER_STARTED |
99 | self.be.save() | 99 | self.be.save() |
100 | 100 | ||
101 | def stopBBServer(self): | ||
102 | assert self.pokydirname and self._pathexists(self.pokydirname) | ||
103 | assert self.islayerset | ||
104 | print self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" % | ||
105 | (self.pokydirname, self.be.builddir, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)())) | ||
106 | self.be.bbstate = BuildEnvironment.SERVER_STOPPED | ||
107 | self.be.save() | ||
108 | print "Stopped server" | ||
109 | |||
110 | |||
111 | def _copyFile(self, filepath1, filepath2): | 101 | def _copyFile(self, filepath1, filepath2): |
112 | p = subprocess.Popen("scp '%s' '%s'" % (filepath1, filepath2), stdout=subprocess.PIPE, stderr = subprocess.PIPE, shell=True) | 102 | p = subprocess.Popen("scp '%s' '%s'" % (filepath1, filepath2), stdout=subprocess.PIPE, stderr = subprocess.PIPE, shell=True) |
113 | (out, err) = p.communicate() | 103 | (out, err) = p.communicate() |
diff --git a/bitbake/lib/toaster/bldcontrol/tests.py b/bitbake/lib/toaster/bldcontrol/tests.py index 5dbc77fda5..f54cf7f366 100644 --- a/bitbake/lib/toaster/bldcontrol/tests.py +++ b/bitbake/lib/toaster/bldcontrol/tests.py | |||
@@ -71,9 +71,6 @@ class BEControllerTests(object): | |||
71 | 71 | ||
72 | self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, int(bc.be.bbport))), "Server not answering") | 72 | self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, int(bc.be.bbport))), "Server not answering") |
73 | 73 | ||
74 | bc.stopBBServer() | ||
75 | self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, int(bc.be.bbport))), "Server not stopped") | ||
76 | |||
77 | self._serverForceStop(bc) | 74 | self._serverForceStop(bc) |
78 | 75 | ||
79 | def test_getBBController(self): | 76 | def test_getBBController(self): |
@@ -96,7 +93,6 @@ class BEControllerTests(object): | |||
96 | 93 | ||
97 | bbc = bc.getBBController() | 94 | bbc = bc.getBBController() |
98 | self.assertTrue(isinstance(bbc, BitbakeController)) | 95 | self.assertTrue(isinstance(bbc, BitbakeController)) |
99 | bc.stopBBServer() | ||
100 | 96 | ||
101 | self._serverForceStop(bc) | 97 | self._serverForceStop(bc) |
102 | 98 | ||