diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-17 12:27:48 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-26 09:27:32 +0100 |
commit | 335c975650580001b2176020c762c002bde198d6 (patch) | |
tree | a9e2907b72bbbac2ad897b7839f8114e60935038 /bitbake/lib/toaster/bldcontrol | |
parent | d7c8d9558c8b600be1507212c78dde833b2bb57e (diff) | |
download | poky-335c975650580001b2176020c762c002bde198d6.tar.gz |
bitbake: toaster: fixes after replacing BuildRequest with Build
This is a set of fixes that repair the interface after
we switched from displaying BuildRequest data to Build data
in the formerly "managed" mode.
(Bitbake rev: 57f790b0c56297af8c83d5def8461bd5d61fe4af)
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')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 2 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 7 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/models.py | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index d0f86325e9..ad0a561398 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
@@ -322,7 +322,7 @@ class LocalhostBEController(BuildEnvironmentController): | |||
322 | def triggerBuild(self, bitbake, layers, variables, targets): | 322 | def triggerBuild(self, bitbake, layers, variables, targets): |
323 | # set up the buid environment with the needed layers | 323 | # set up the buid environment with the needed layers |
324 | self.setLayers(bitbake, layers) | 324 | self.setLayers(bitbake, layers) |
325 | self.writeConfFile("conf/toaster-pre.conf", ) | 325 | self.writeConfFile("conf/toaster-pre.conf", variables) |
326 | self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"") | 326 | self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"") |
327 | 327 | ||
328 | # get the bb server running with the build req id and build env id | 328 | # get the bb server running with the build req id and build env id |
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index da7d4af07e..bcf3b04cf0 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |||
@@ -6,7 +6,7 @@ from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariabl | |||
6 | import os | 6 | import os |
7 | import logging | 7 | import logging |
8 | 8 | ||
9 | logger = logging.getLogger("toaster") | 9 | logger = logging.getLogger("ToasterScheduler") |
10 | 10 | ||
11 | class Command(NoArgsCommand): | 11 | class Command(NoArgsCommand): |
12 | args = "" | 12 | args = "" |
@@ -35,7 +35,7 @@ class Command(NoArgsCommand): | |||
35 | # select the build environment and the request to build | 35 | # select the build environment and the request to build |
36 | br = self._selectBuildRequest() | 36 | br = self._selectBuildRequest() |
37 | except IndexError as e: | 37 | except IndexError as e: |
38 | # logger.debug("runbuilds: No build request") | 38 | #logger.debug("runbuilds: No build request") |
39 | return | 39 | return |
40 | try: | 40 | try: |
41 | bec = self._selectBuildEnvironment() | 41 | bec = self._selectBuildEnvironment() |
@@ -113,10 +113,11 @@ class Command(NoArgsCommand): | |||
113 | 113 | ||
114 | # update all Builds that failed to start | 114 | # update all Builds that failed to start |
115 | 115 | ||
116 | for br in BuildRequest.objects.filter(state = BuildRequest.REQ_FAILED): | 116 | for br in BuildRequest.objects.filter(state = BuildRequest.REQ_FAILED, build__outcome = Build.IN_PROGRESS): |
117 | br.build.outcome = Build.FAILED | 117 | br.build.outcome = Build.FAILED |
118 | # transpose the launch errors in ToasterExceptions | 118 | # transpose the launch errors in ToasterExceptions |
119 | for brerror in br.brerror_set.all(): | 119 | for brerror in br.brerror_set.all(): |
120 | logger.debug("Saving error %s" % brerror) | ||
120 | LogMessage.objects.create(build = br.build, level = LogMessage.EXCEPTION, message = brerror.errmsg) | 121 | LogMessage.objects.create(build = br.build, level = LogMessage.EXCEPTION, message = brerror.errmsg) |
121 | br.build.save() | 122 | br.build.save() |
122 | 123 | ||
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index b789446fa1..6f408660de 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py | |||
@@ -159,3 +159,6 @@ class BRError(models.Model): | |||
159 | errtype = models.CharField(max_length=100) | 159 | errtype = models.CharField(max_length=100) |
160 | errmsg = models.TextField() | 160 | errmsg = models.TextField() |
161 | traceback = models.TextField() | 161 | traceback = models.TextField() |
162 | |||
163 | def __str__(self): | ||
164 | return "%s (%s)" % (self.errmsg, self.req) | ||