diff options
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/sshbecontroller.py')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/sshbecontroller.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/sshbecontroller.py b/bitbake/lib/toaster/bldcontrol/sshbecontroller.py index 29ed0a770f..8ef434baf5 100644 --- a/bitbake/lib/toaster/bldcontrol/sshbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/sshbecontroller.py | |||
@@ -156,3 +156,24 @@ class SSHBEController(BuildEnvironmentController): | |||
156 | import shutil | 156 | import shutil |
157 | shutil.rmtree(os.path.join(self.be.sourcedir, "build")) | 157 | shutil.rmtree(os.path.join(self.be.sourcedir, "build")) |
158 | assert not self._pathexists(self.be.builddir) | 158 | assert not self._pathexists(self.be.builddir) |
159 | |||
160 | def triggerBuild(self, bitbake, layers, variables, targets): | ||
161 | # set up the buid environment with the needed layers | ||
162 | self.setLayers(bitbake, layers) | ||
163 | self.writeConfFile("conf/toaster-pre.conf", ) | ||
164 | self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"") | ||
165 | |||
166 | # get the bb server running with the build req id and build env id | ||
167 | bbctrl = self.getBBController() | ||
168 | |||
169 | # trigger the build command | ||
170 | task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, targets)) | ||
171 | if len(task) == 0: | ||
172 | task = None | ||
173 | |||
174 | bbctrl.build(list(map(lambda x:x.target, targets)), task) | ||
175 | |||
176 | logger.debug("localhostbecontroller: Build launched, exiting. Follow build logs at %s/toaster_ui.log" % self.be.builddir) | ||
177 | |||
178 | # disconnect from the server | ||
179 | bbctrl.disconnect() | ||