Patchwork [bitbake-devel,6/8] toaster: add empty outcome support to task page

login
register
mail settings
Submitter Alexandru DAMIAN
Date March 11, 2014, 3:49 p.m.
Message ID <874b627b96809c274023b5fa330dfbdd14676d19.1394552757.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/68411/
State New
Headers show

Comments

Alexandru DAMIAN - March 11, 2014, 3:49 p.m.
From: David Reyna <David.Reyna@windriver.com>

Add the new "empty" outcome value to the task detail page,
with help text, help notice, plus sorting for empty in the
tasks page.

[YOCTO #5917]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
---
 lib/toaster/orm/models.py                  | 1 +
 lib/toaster/toastergui/templates/task.html | 4 ++++
 lib/toaster/toastergui/views.py            | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 0646813..93506d7 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -146,6 +146,7 @@  class Task(models.Model):
         (OUTCOME_CACHED, 'This task restored output from the sstate-cache directory or mirrors'),
         (OUTCOME_PREBUILT, 'This task did not run because its outcome was reused from a previous build'),
         (OUTCOME_FAILED, 'This task did not complete'),
+        (OUTCOME_EMPTY, 'This task has no executable content'),
         (OUTCOME_NA, ''),
     )
 
diff --git a/lib/toaster/toastergui/templates/task.html b/lib/toaster/toastergui/templates/task.html
index a8bcb52..5d79d44 100644
--- a/lib/toaster/toastergui/templates/task.html
+++ b/lib/toaster/toastergui/templates/task.html
@@ -121,6 +121,10 @@ 
 		</code>
             </dd>
         </dl>
+    {%elif task.outcome == task.OUTCOME_EMPTY%}
+        <div class="alert alert-info details">
+            This task is empty because it has the <code>noexec</code> flag set to <code>1</code>, or the task function is empty
+        </div>
     {% endif %}
 {% endif %}
 
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index ccf9585..6273d4c 100644
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -558,7 +558,7 @@  def tasks_common(request, build_id, variant):
                                ('Cached Tasks', 'outcome:%d'%Task.OUTCOME_CACHED),
                                ('Prebuilt Tasks', 'outcome:%d'%Task.OUTCOME_PREBUILT),
                                ('Covered Tasks', 'outcome:%d'%Task.OUTCOME_COVERED),
-                               ('Empty Tasks', 'outcome:%d'%Task.OUTCOME_NA),
+                               ('Empty Tasks', 'outcome:%d'%Task.OUTCOME_EMPTY),
                                ]
                    }