1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

bitbake: toaster: models Add cancelled state to build outcome

A new state CANCELLED is introduced to, distinguish
the state of build.

[YOCTO #6787]

(Bitbake rev: 404f406fecae879703bcfe96f3b65086b115fa8a)

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Sujith H
2016-04-06 17:46:34 +01:00
committed by Richard Purdie
parent 5f862bb567
commit dfa85109d6
2 changed files with 25 additions and 1 deletions
+6 -1
View File
@@ -358,11 +358,13 @@ class Build(models.Model):
SUCCEEDED = 0
FAILED = 1
IN_PROGRESS = 2
CANCELLED = 3
BUILD_OUTCOME = (
(SUCCEEDED, 'Succeeded'),
(FAILED, 'Failed'),
(IN_PROGRESS, 'In Progress'),
(CANCELLED, 'Cancelled'),
)
search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"]
@@ -390,7 +392,10 @@ class Build(models.Model):
if project:
builds = builds.filter(project=project)
finished_criteria = Q(outcome=Build.SUCCEEDED) | Q(outcome=Build.FAILED)
finished_criteria = \
Q(outcome=Build.SUCCEEDED) | \
Q(outcome=Build.FAILED) | \
Q(outcome=Build.CANCELLED)
recent_builds = list(itertools.chain(
builds.filter(outcome=Build.IN_PROGRESS).order_by("-started_on"),