summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-02-13 13:12:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-09 12:23:57 -0700
commit3d0bb418a08aa96dd57c15b695385775ce3bddc8 (patch)
treef39bb8adbf421f0296b4d97434bd105f01e88a8a /bitbake/lib/bb/ui
parent7008a24792704b8e757c583663636addf49f397d (diff)
downloadpoky-3d0bb418a08aa96dd57c15b695385775ce3bddc8.tar.gz
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 <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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