summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-09-16 17:22:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-21 21:58:06 +0100
commite9a12e5d37390632ac6f265f9513106f00ccdbb9 (patch)
tree12d4c7e78b70617aabf7d4294652c9d41a2d9cff /bitbake
parent2478a6f2084e0217983dafb6862b1ec4fd4f6049 (diff)
downloadpoky-e9a12e5d37390632ac6f265f9513106f00ccdbb9.tar.gz
bitbake: toaster: notify runbuilds when build status changes
Called signal_runbuilds API when build is scheduled, cancelled or finished to notify runbuilds process about builds status change. [YOCTO #8918] (Bitbake rev: fe08f0fa4b328908e73695ebbceca87bc86a49f9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py4
-rw-r--r--bitbake/lib/toaster/orm/models.py2
2 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 96166dc515..c93ee94d2c 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -43,6 +43,7 @@ from orm.models import Package, Package_File, Target_Installed_Package, Target_F
43from orm.models import Task_Dependency, Package_Dependency 43from orm.models import Task_Dependency, Package_Dependency
44from orm.models import Recipe_Dependency, Provides 44from orm.models import Recipe_Dependency, Provides
45from orm.models import Project, CustomImagePackage, CustomImageRecipe 45from orm.models import Project, CustomImagePackage, CustomImageRecipe
46from orm.models import signal_runbuilds
46 47
47from bldcontrol.models import BuildEnvironment, BuildRequest 48from bldcontrol.models import BuildEnvironment, BuildRequest
48 49
@@ -234,6 +235,7 @@ class ORMWrapper(object):
234 build.completed_on = timezone.now() 235 build.completed_on = timezone.now()
235 build.outcome = outcome 236 build.outcome = outcome
236 build.save() 237 build.save()
238 signal_runbuilds()
237 239
238 def update_target_set_license_manifest(self, target, license_manifest_path): 240 def update_target_set_license_manifest(self, target, license_manifest_path):
239 target.license_manifest_path = license_manifest_path 241 target.license_manifest_path = license_manifest_path
@@ -1354,6 +1356,7 @@ class BuildInfoHelper(object):
1354 self._ensure_build() 1356 self._ensure_build()
1355 self.internal_state['build'].outcome = Build.CANCELLED 1357 self.internal_state['build'].outcome = Build.CANCELLED
1356 self.internal_state['build'].save() 1358 self.internal_state['build'].save()
1359 signal_runbuilds()
1357 1360
1358 def store_dependency_information(self, event): 1361 def store_dependency_information(self, event):
1359 assert '_depgraph' in vars(event) 1362 assert '_depgraph' in vars(event)
@@ -1540,6 +1543,7 @@ class BuildInfoHelper(object):
1540 else: 1543 else:
1541 br.state = BuildRequest.REQ_FAILED 1544 br.state = BuildRequest.REQ_FAILED
1542 br.save() 1545 br.save()
1546 signal_runbuilds()
1543 1547
1544 def store_log_error(self, text): 1548 def store_log_error(self, text):
1545 mockevent = MockEvent() 1549 mockevent = MockEvent()
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 38d014a7f8..a7de57c256 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -377,6 +377,8 @@ class Project(models.Model):
377 except ProjectVariable.DoesNotExist: 377 except ProjectVariable.DoesNotExist:
378 pass 378 pass
379 br.save() 379 br.save()
380 signal_runbuilds()
381
380 except Exception: 382 except Exception:
381 # revert the build request creation since we're not done cleanly 383 # revert the build request creation since we're not done cleanly
382 br.delete() 384 br.delete()