[bitbake-devel,24/94] bitbake: dsi: event data change
Details
Commit Message
@@ -116,7 +116,7 @@ class ORMWrapper(object):
task_information['log_file'] = 'Not Available'
task_information['work_directory'] = 'Not Available'
task_information['script_type'] = 0
- task_information['file_path'] = 'Not Available'
+ task_information['file_path'] = event.taskfile
task_information['line_number'] = 0
task_information['py_stack_trace'] = 'Not Available'
task_information['disk_io'] = 0
@@ -132,7 +132,7 @@ class ORMWrapper(object):
def create_task_object(self, task_information):
self.task_order += 1
- identifier = task_information['recipe'].name + task_information['task_name']
+ identifier = task_information['recipe'].file_path + task_information['task_name']
task_object = Task.objects.get_or_create(
build=task_information['build'],
@@ -173,14 +173,16 @@ class ORMWrapper(object):
if isinstance(event, bb.runqueue.runQueueTaskCompleted):
task.outcome = 3
+ task.save()
+
+ if isinstance(event, bb.build.TaskBase):
+ task.recipe.name = event._package
+ task.recipe.save()
task_build_stats = self._get_task_build_stats(task)
task.cpu_usage = task_build_stats['cpu_usage']
task.disk_io = task_build_stats['disk_io']
- if outcome_info.get('error', ''):
- task.error = outcome_info['error']
-
#TODO: get error number
#TODO: get warnings number
#TODO: get warning information
@@ -264,7 +266,7 @@ class ORMWrapper(object):
build_layer_obj = self._get_build_layer_object(event)
recipe_info = {}
- recipe_info['name'] = event.taskpackage
+ recipe_info['name'] = 'N/A'
recipe_info['version'] = 'Not Available'
recipe_info['layer'] = build_layer_obj
recipe_info['summary'] = 'Not Available'
@@ -275,7 +277,8 @@ class ORMWrapper(object):
recipe_info['homepage'] = 'Not Available'
recipe_info['bugtracker'] = 'Not Available'
recipe_info['author'] = 'Not Available'
- recipe_info['file_path'] = 'Not Available'
+ recipe_info['file_path'] = event.taskfile
+
return recipe_info
@@ -406,7 +409,8 @@ class BuildInfoHelper(object):
task_obj = self.orm_wrapper.create_task_object(task_information)
def update_and_store_task(self, event):
- identifier = event.taskpackage + event.taskname
+ identifier = event.taskfile + event.taskname
task_dictionary = self.orm_wrapper.transport_utils[identifier]
self.orm_wrapper.update_task_object(task_dictionary, event)
- del self.orm_wrapper.transport_utils[identifier]
+ if isinstance(event,bb.runqueue.runQueueTaskCompleted):
+ del self.orm_wrapper.transport_utils[identifier]
@@ -288,6 +288,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
buildinfohelper.store_started_build(event)
if isinstance(event, (bb.build.TaskSucceeded, bb.build.TaskFailedSilent, bb.build.TaskFailed)):
+ buildinfohelper.update_and_store_task(event)
continue
if isinstance(event, bb.event.LogExecTTY):