summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 0a8073f916..4c9c96b1bc 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -458,7 +458,7 @@ class BuildInfoHelper(object):
458 task_information['task_executed'] = True 458 task_information['task_executed'] = True
459 if 'noexec' in vars(event) and event.noexec == True: 459 if 'noexec' in vars(event) and event.noexec == True:
460 task_information['task_executed'] = False 460 task_information['task_executed'] = False
461 task_information['outcome'] = Task.OUTCOME_NA 461 task_information['outcome'] = Task.OUTCOME_EMPTY
462 task_information['script_type'] = Task.CODING_NA 462 task_information['script_type'] = Task.CODING_NA
463 463
464 # do not assign order numbers to scene tasks 464 # do not assign order numbers to scene tasks
@@ -468,7 +468,10 @@ class BuildInfoHelper(object):
468 468
469 task_obj = self.orm_wrapper.get_update_task_object(task_information) 469 task_obj = self.orm_wrapper.get_update_task_object(task_information)
470 470
471 self.internal_state[identifier] = {'start_time': datetime.datetime.now()} 471 self.internal_state[identifier] = {
472 'start_time': datetime.datetime.now(),
473 'outcome': task_information['outcome'],
474 }
472 475
473 476
474 def store_tasks_stats(self, event): 477 def store_tasks_stats(self, event):
@@ -489,10 +492,9 @@ class BuildInfoHelper(object):
489 recipe_information = self._get_recipe_information_from_taskfile(event.taskfile) 492 recipe_information = self._get_recipe_information_from_taskfile(event.taskfile)
490 recipe = self.orm_wrapper.get_update_recipe_object(recipe_information) 493 recipe = self.orm_wrapper.get_update_recipe_object(recipe_information)
491 task_information = self._get_task_information(event,recipe) 494 task_information = self._get_task_information(event,recipe)
492 try: 495
493 task_information['start_time'] = self.internal_state[identifier]['start_time'] 496 task_information['start_time'] = self.internal_state[identifier]['start_time']
494 except: 497 task_information['outcome'] = self.internal_state[identifier]['outcome']
495 pass
496 498
497 if 'logfile' in vars(event): 499 if 'logfile' in vars(event):
498 task_information['logfile'] = event.logfile 500 task_information['logfile'] = event.logfile
@@ -507,13 +509,14 @@ class BuildInfoHelper(object):
507 else: 509 else:
508 task_information['script_type'] = Task.CODING_SHELL 510 task_information['script_type'] = Task.CODING_SHELL
509 511
510 if isinstance(event, (bb.runqueue.runQueueTaskCompleted, bb.runqueue.sceneQueueTaskCompleted)): 512 if task_information['outcome'] == Task.OUTCOME_NA:
511 task_information['outcome'] = Task.OUTCOME_SUCCESS 513 if isinstance(event, (bb.runqueue.runQueueTaskCompleted, bb.runqueue.sceneQueueTaskCompleted)):
512 del self.internal_state[identifier] 514 task_information['outcome'] = Task.OUTCOME_SUCCESS
515 del self.internal_state[identifier]
513 516
514 if isinstance(event, (bb.runqueue.runQueueTaskFailed, bb.runqueue.sceneQueueTaskFailed)): 517 if isinstance(event, (bb.runqueue.runQueueTaskFailed, bb.runqueue.sceneQueueTaskFailed)):
515 task_information['outcome'] = Task.OUTCOME_FAILED 518 task_information['outcome'] = Task.OUTCOME_FAILED
516 del self.internal_state[identifier] 519 del self.internal_state[identifier]
517 520
518 self.orm_wrapper.get_update_task_object(task_information) 521 self.orm_wrapper.get_update_task_object(task_information)
519 522