summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-01-28 13:18:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-30 15:14:58 +0000
commitafe85485fe185b663a1285b5c27de3160bf06cf7 (patch)
tree487cdf0fbbd11353094c1f68bc1034b3390dd7e6 /bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
parentc58c94824b29665f52ae67ceae3f096930c89fe5 (diff)
downloadpoky-afe85485fe185b663a1285b5c27de3160bf06cf7.tar.gz
bitbake: toaster: new layer checkout logic
This patch implements a new layer checkout logic that brings more flexibility in getting layers under different commits work with Toaster. The new hibrid logic will checkout separately each layer and commit id; the task execution will be delegated to the checkedout bitbake, but the data logger will be executed from the current toaster version as to bring in enough data to sustain the updates in UI models. [YOCTO #7171] [YOCTO #6892] (Bitbake rev: c6eb0f7f16c59530c2525b2e5629fe86de4e8f0f) 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/management/commands/runbuilds.py')
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index bdce6ee902..23ee855558 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -2,7 +2,7 @@ from django.core.management.base import NoArgsCommand, CommandError
2from django.db import transaction 2from django.db import transaction
3from orm.models import Build 3from orm.models import Build
4from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException, BuildSetupException 4from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException, BuildSetupException
5from bldcontrol.models import BuildRequest, BuildEnvironment, BRError 5from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable
6import os 6import os
7import logging 7import logging
8 8
@@ -47,6 +47,9 @@ class Command(NoArgsCommand):
47 return 47 return
48 48
49 logger.debug("runbuilds: starting build %s, environment %s" % (br, bec.be)) 49 logger.debug("runbuilds: starting build %s, environment %s" % (br, bec.be))
50
51 # write the build identification variable
52 BRVariable.objects.create(req = br, name="TOASTER_BRBE", value="%d:%d" % (br.pk, bec.be.pk))
50 # let the build request know where it is being executed 53 # let the build request know where it is being executed
51 br.environment = bec.be 54 br.environment = bec.be
52 br.save() 55 br.save()
@@ -56,7 +59,7 @@ class Command(NoArgsCommand):
56 bec.writePreConfFile(br.brvariable_set.all()) 59 bec.writePreConfFile(br.brvariable_set.all())
57 60
58 # get the bb server running with the build req id and build env id 61 # get the bb server running with the build req id and build env id
59 bbctrl = bec.getBBController("%d:%d" % (br.pk, bec.be.pk)) 62 bbctrl = bec.getBBController()
60 63
61 # trigger the build command 64 # trigger the build command
62 task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, br.brtarget_set.all())) 65 task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, br.brtarget_set.all()))