]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: include setscene in task progress
authorDavid Reyna <David.Reyna@windriver.com>
Tue, 11 Jul 2017 21:56:08 +0000 (14:56 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 21 Jul 2017 08:26:18 +0000 (09:26 +0100)
Change the task progress counting from the task order field
which excludes setscene to the task completion field which
counts all completed tasks regardless of type.

[YOCTO #9971]

(Bitbake rev: 485b328430dcdfd0b52f09f01ebd490d09459ea3)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/orm/models.py

index 630e4a00031d20319187c4d942fa0f91d57f7b45..e9182c56e7495b2a1d9c712130c58a501cc977f5 100644 (file)
@@ -508,7 +508,7 @@ class Build(models.Model):
         tf = Task.objects.filter(build = self)
         tfc = tf.count()
         if tfc > 0:
-            completeper = tf.exclude(order__isnull=True).count()*100 // tfc
+            completeper = tf.exclude(outcome=Task.OUTCOME_NA).count()*100 // tfc
         else:
             completeper = 0
         return completeper
@@ -709,10 +709,11 @@ class Build(models.Model):
         tasks.
 
         Note that the mechanism for testing whether a Task is "done" is whether
-        its order field is set, as per the completeper() method.
+        its outcome field is set, as per the completeper() method.
         """
         return self.outcome == Build.IN_PROGRESS and \
-            self.task_build.filter(order__isnull=False).count() == 0
+            self.task_build.exclude(outcome=Task.OUTCOME_NA).count() == 0
+
 
     def get_state(self):
         """