summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-01-14 12:35:12 +0000
committerAlexandru DAMIAN <alexandru.damian@intel.com>2014-01-27 15:19:49 +0000
commita4164821a142f8b625a5fdc209adc6dc80874241 (patch)
tree88fd56b864c7649017fd7c2152aad7ae0673c503 /lib/bb/ui/buildinfohelper.py
parent6ed1a28eb0e52a6de83a37664ff6f4418ce84ee4 (diff)
downloadbitbake-a4164821a142f8b625a5fdc209adc6dc80874241.tar.gz
toaster: update Task classification fields
This patch updates the task classification fields (outcome, etc) as to * Changes outcome names from SSTATE to CACHED and from EXISTING to PREBUILT * NoExec tasks now recorded as Not Executed / script type NA instead of Executed / script type NOEXEC. Script type NOEXEC is deleted. * SetScene tasks do not get order numbers * New task method that returns a QuerySet for setscene tasks related to this task: Task.get_related_setscene() * New custom TaskManager that allows searching for setscene tasks related to a certain task: Task.objects.related_setscene(task) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/bb/ui/buildinfohelper.py')
-rw-r--r--lib/bb/ui/buildinfohelper.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 3d5f1c860..b90e915a1 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -91,9 +91,9 @@ class ORMWrapper(object):
for v in vars(task_object):
if v in task_information.keys():
vars(task_object)[v] = task_information[v]
- # if we got covered by a setscene task, we're SSTATE
- if task_object.outcome == Task.OUTCOME_COVERED and 1 == Task.objects.filter(task_executed=True, build = task_object.build, recipe = task_object.recipe, task_name=task_object.task_name+"_setscene").count():
- task_object.outcome = Task.OUTCOME_SSTATE
+ # if we got covered by a setscene task, we're CACHED
+ if task_object.outcome == Task.OUTCOME_COVERED and 1 == Task.objects.related_setscene(task_object).count():
+ task_object.outcome = Task.OUTCOME_CACHED
outcome_task_setscene = Task.objects.get(task_executed=True, build = task_object.build,
recipe = task_object.recipe, task_name=task_object.task_name+"_setscene").outcome
if outcome_task_setscene == Task.OUTCOME_SUCCESS:
@@ -442,14 +442,19 @@ class BuildInfoHelper(object):
if event.reason == "covered":
task_information['outcome'] = Task.OUTCOME_COVERED
if event.reason == "existing":
- task_information['outcome'] = Task.OUTCOME_EXISTING
+ task_information['outcome'] = Task.OUTCOME_PREBUILT
else:
task_information['task_executed'] = True
if 'noexec' in vars(event) and event.noexec == True:
- task_information['script_type'] = Task.CODING_NOEXEC
+ task_information['task_executed'] = False
+ task_information['outcome'] = Task.OUTCOME_NA
+ task_information['script_type'] = Task.CODING_NA
+
+ # do not assign order numbers to scene tasks
+ if not isinstance(event, bb.runqueue.sceneQueueTaskStarted):
+ self.task_order += 1
+ task_information['order'] = self.task_order
- self.task_order += 1
- task_information['order'] = self.task_order
task_obj = self.orm_wrapper.get_update_task_object(task_information)
self.internal_state[identifier] = {'start_time': datetime.datetime.now()}