summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-01-14 12:35:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-27 21:01:03 +0000
commit731a0ac2c8ee7f09c24e30b01ac6e3aeaeb1fd08 (patch)
tree95e31f60da5a68d5c2032296ce4450f8c6d9f8db /bitbake/lib/bb/ui/buildinfohelper.py
parent3e1dbed33822dd949336022bc155cc5435719b38 (diff)
downloadpoky-731a0ac2c8ee7f09c24e30b01ac6e3aeaeb1fd08.tar.gz
bitbake: 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) (Bitbake rev: a4164821a142f8b625a5fdc209adc6dc80874241) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 3d5f1c8609..b90e915a1a 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -91,9 +91,9 @@ class ORMWrapper(object):
91 for v in vars(task_object): 91 for v in vars(task_object):
92 if v in task_information.keys(): 92 if v in task_information.keys():
93 vars(task_object)[v] = task_information[v] 93 vars(task_object)[v] = task_information[v]
94 # if we got covered by a setscene task, we're SSTATE 94 # if we got covered by a setscene task, we're CACHED
95 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(): 95 if task_object.outcome == Task.OUTCOME_COVERED and 1 == Task.objects.related_setscene(task_object).count():
96 task_object.outcome = Task.OUTCOME_SSTATE 96 task_object.outcome = Task.OUTCOME_CACHED
97 outcome_task_setscene = Task.objects.get(task_executed=True, build = task_object.build, 97 outcome_task_setscene = Task.objects.get(task_executed=True, build = task_object.build,
98 recipe = task_object.recipe, task_name=task_object.task_name+"_setscene").outcome 98 recipe = task_object.recipe, task_name=task_object.task_name+"_setscene").outcome
99 if outcome_task_setscene == Task.OUTCOME_SUCCESS: 99 if outcome_task_setscene == Task.OUTCOME_SUCCESS:
@@ -442,14 +442,19 @@ class BuildInfoHelper(object):
442 if event.reason == "covered": 442 if event.reason == "covered":
443 task_information['outcome'] = Task.OUTCOME_COVERED 443 task_information['outcome'] = Task.OUTCOME_COVERED
444 if event.reason == "existing": 444 if event.reason == "existing":
445 task_information['outcome'] = Task.OUTCOME_EXISTING 445 task_information['outcome'] = Task.OUTCOME_PREBUILT
446 else: 446 else:
447 task_information['task_executed'] = True 447 task_information['task_executed'] = True
448 if 'noexec' in vars(event) and event.noexec == True: 448 if 'noexec' in vars(event) and event.noexec == True:
449 task_information['script_type'] = Task.CODING_NOEXEC 449 task_information['task_executed'] = False
450 task_information['outcome'] = Task.OUTCOME_NA
451 task_information['script_type'] = Task.CODING_NA
452
453 # do not assign order numbers to scene tasks
454 if not isinstance(event, bb.runqueue.sceneQueueTaskStarted):
455 self.task_order += 1
456 task_information['order'] = self.task_order
450 457
451 self.task_order += 1
452 task_information['order'] = self.task_order
453 task_obj = self.orm_wrapper.get_update_task_object(task_information) 458 task_obj = self.orm_wrapper.get_update_task_object(task_information)
454 459
455 self.internal_state[identifier] = {'start_time': datetime.datetime.now()} 460 self.internal_state[identifier] = {'start_time': datetime.datetime.now()}