[bitbake-devel] [PATCH 2/8] toastergui: stop covered task graph traversal early

Alex DAMIAN alexandru.damian at intel.com
Thu Feb 26 21:41:55 UTC 2015


From: Alexandru DAMIAN <alexandru.damian at intel.com>

This patch stops the breadth-frist graph traversal for
finding covering tasks after the finding the first level
of executed tasks.

The reasoning is that the first level of executed tasks is the
actually relevent information on how a task was covered.

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 lib/toaster/toastergui/views.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index aabc3d0..a206f80 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -357,6 +357,8 @@ def generateCoveredList2( revlist = [] ):
     covered_list =  [ x for x in revlist if x.outcome == Task.OUTCOME_COVERED ]
     while len(covered_list):
         revlist =  [ x for x in revlist if x.outcome != Task.OUTCOME_COVERED ]
+        if len(revlist) > 0:
+            return revlist
 
         newlist = _find_task_revdep_list(covered_list)
 
@@ -379,10 +381,7 @@ def task( request, build_id, task_id ):
     coveredBy = '';
     if ( task.outcome == Task.OUTCOME_COVERED ):
 #        _list = generateCoveredList( task )
-        _list = generateCoveredList2( _find_task_revdep( task ) )
-        coveredBy = [ ]
-        for t in _list:
-            coveredBy.append( t )
+        coveredBy = sorted(generateCoveredList2( _find_task_revdep( task ) ), key = lambda x: x.recipe.name)
     log_head = ''
     log_body = ''
     if task.outcome == task.OUTCOME_FAILED:
-- 
1.9.1




More information about the bitbake-devel mailing list