Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E5F2FE00BB3; Fri, 30 Jun 2017 19:28:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [147.11.1.11 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C01B3E00BAD for ; Fri, 30 Jun 2017 19:28:25 -0700 (PDT) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id v612SOLO026746 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Fri, 30 Jun 2017 19:28:24 -0700 (PDT) Received: from ala-dreyna-lx3.corp.ad.wrs.com (147.11.157.78) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server (TLS) id 14.3.294.0; Fri, 30 Jun 2017 19:28:24 -0700 From: David Reyna To: Date: Fri, 30 Jun 2017 19:19:48 -0700 Message-ID: <1498875588-26397-1-git-send-email-david.reyna@windriver.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [147.11.157.78] Subject: [PATCH] toaster: include setscene in task progress X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 02:28:29 -0000 Content-Type: text/plain From: David Reyna 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] Signed-off-by: David Reyna --- bitbake/lib/toaster/orm/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 630e4a0..e9182c5 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -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): """ -- 1.9.1