diff options
author | David Reyna <David.Reyna@windriver.com> | 2017-07-11 14:56:08 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-21 09:26:18 +0100 |
commit | 36568b9e1e079f55a6d2e7bad0fd3ca27c90bb53 (patch) | |
tree | 761c543f65d38335eb9ea79ba1d73bfbc4f2a255 /bitbake/lib | |
parent | b4f026671657816257222d98407dae6ed7f78f9c (diff) | |
download | poky-36568b9e1e079f55a6d2e7bad0fd3ca27c90bb53.tar.gz |
bitbake: toaster: include setscene in task progress
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>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 630e4a0003..e9182c56e7 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -508,7 +508,7 @@ class Build(models.Model): | |||
508 | tf = Task.objects.filter(build = self) | 508 | tf = Task.objects.filter(build = self) |
509 | tfc = tf.count() | 509 | tfc = tf.count() |
510 | if tfc > 0: | 510 | if tfc > 0: |
511 | completeper = tf.exclude(order__isnull=True).count()*100 // tfc | 511 | completeper = tf.exclude(outcome=Task.OUTCOME_NA).count()*100 // tfc |
512 | else: | 512 | else: |
513 | completeper = 0 | 513 | completeper = 0 |
514 | return completeper | 514 | return completeper |
@@ -709,10 +709,11 @@ class Build(models.Model): | |||
709 | tasks. | 709 | tasks. |
710 | 710 | ||
711 | Note that the mechanism for testing whether a Task is "done" is whether | 711 | Note that the mechanism for testing whether a Task is "done" is whether |
712 | its order field is set, as per the completeper() method. | 712 | its outcome field is set, as per the completeper() method. |
713 | """ | 713 | """ |
714 | return self.outcome == Build.IN_PROGRESS and \ | 714 | return self.outcome == Build.IN_PROGRESS and \ |
715 | self.task_build.filter(order__isnull=False).count() == 0 | 715 | self.task_build.exclude(outcome=Task.OUTCOME_NA).count() == 0 |
716 | |||
716 | 717 | ||
717 | def get_state(self): | 718 | def get_state(self): |
718 | """ | 719 | """ |