From 3d0bb418a08aa96dd57c15b695385775ce3bddc8 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Thu, 13 Feb 2014 13:12:39 +0000 Subject: bitbake: toasterui: adding new task outcome empty In order to separate tasks with invalid states from the no exec tasks, we add a new value OUTCOME_EMPTY for the tasks. OUTCOME_EMPTY has the same value as OUTCOME_NA as to maintain compatibility with already existing builds. New value for OUTCOME_NA can be used to detect tasks with invalid states, i.e. it should never appear after finishing a build. Fixing noexec tasks outcomes. [YOCTO #5763] (Bitbake rev: 475643ad78796835bf2e731b9d0fa5794ec80dd1) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/toaster/orm') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index f96da9c339..af44d86ff3 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -93,20 +93,22 @@ class Task(models.Model): (CODING_SHELL, 'Shell'), ) + OUTCOME_NA = -1 OUTCOME_SUCCESS = 0 OUTCOME_COVERED = 1 OUTCOME_CACHED = 2 OUTCOME_PREBUILT = 3 OUTCOME_FAILED = 4 - OUTCOME_NA = 5 + OUTCOME_EMPTY = 5 TASK_OUTCOME = ( + (OUTCOME_NA, 'Not Available'), (OUTCOME_SUCCESS, 'Succeeded'), (OUTCOME_COVERED, 'Covered'), (OUTCOME_CACHED, 'Cached'), (OUTCOME_PREBUILT, 'Prebuilt'), (OUTCOME_FAILED, 'Failed'), - (OUTCOME_NA, 'Not Available'), + (OUTCOME_EMPTY, 'Empty'), ) search_allowed_fields = [ "recipe__name", "task_name" ] @@ -142,6 +144,7 @@ class Task(models.Model): class Meta: ordering = ('order', 'recipe' ,) + unique_together = ('build', 'recipe', 'task_name', ) class Task_Dependency(models.Model): -- cgit v1.2.3-54-g00ecf