diff options
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/localhostbecontroller.py')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index bc3566acee..d0f86325e9 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
@@ -317,3 +317,25 @@ class LocalhostBEController(BuildEnvironmentController): | |||
317 | import shutil | 317 | import shutil |
318 | shutil.rmtree(os.path.join(self.be.sourcedir, "build")) | 318 | shutil.rmtree(os.path.join(self.be.sourcedir, "build")) |
319 | assert not os.path.exists(self.be.builddir) | 319 | assert not os.path.exists(self.be.builddir) |
320 | |||
321 | |||
322 | def triggerBuild(self, bitbake, layers, variables, targets): | ||
323 | # set up the buid environment with the needed layers | ||
324 | self.setLayers(bitbake, layers) | ||
325 | self.writeConfFile("conf/toaster-pre.conf", ) | ||
326 | self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"") | ||
327 | |||
328 | # get the bb server running with the build req id and build env id | ||
329 | bbctrl = self.getBBController() | ||
330 | |||
331 | # trigger the build command | ||
332 | task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, targets)) | ||
333 | if len(task) == 0: | ||
334 | task = None | ||
335 | |||
336 | bbctrl.build(list(map(lambda x:x.target, targets)), task) | ||
337 | |||
338 | logger.debug("localhostbecontroller: Build launched, exiting. Follow build logs at %s/toaster_ui.log" % self.be.builddir) | ||
339 | |||
340 | # disconnect from the server | ||
341 | bbctrl.disconnect() | ||