Patchwork [bitbake-devel,1/1] bitbake/runqueue: always log tasks summary

login
register
mail settings
Submitter Paul Eggleton
Date Jan. 19, 2012, 2:36 p.m.
Message ID <a996be9518b7cd4a9fa50958be65dbd63380c8ca.1326982052.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/19787/
State New
Headers show

Comments

Paul Eggleton - Jan. 19, 2012, 2:36 p.m.
It's unclear from the history but at some point we stopped logging the
"Tasks Summary" NOTE when tasks failed. Reinstate this for failure, and
also make the count of attempted tasks include the failed task.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/lib/bb/runqueue.py |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
Richard Purdie - Jan. 20, 2012, 4:40 p.m.
On Thu, 2012-01-19 at 14:36 +0000, Paul Eggleton wrote:
> It's unclear from the history but at some point we stopped logging the
> "Tasks Summary" NOTE when tasks failed. Reinstate this for failure, and
> also make the count of attempted tasks include the failed task.
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  bitbake/lib/bb/runqueue.py |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 054d36c..be6bbb1 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -959,6 +959,13 @@  class RunQueue:
         if self.state is runQueueCleanUp:
            self.rqexe.finish()
 
+        if self.state is runQueueComplete or self.state is runQueueFailed:
+            if self.rqexe.stats.failed:
+                logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and %d failed.", self.rqexe.stats.completed + self.rqexe.stats.failed, self.rqexe.stats.skipped, self.rqexe.stats.failed)
+            else:
+                # Let's avoid the word "failed" if nothing actually did
+                logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and all succeeded.", self.rqexe.stats.completed, self.rqexe.stats.skipped)
+
         if self.state is runQueueFailed:
             if not self.rqdata.taskData.tryaltconfigs:
                 raise bb.runqueue.TaskFailure(self.rqexe.failed_fnids)
@@ -968,11 +975,6 @@  class RunQueue:
 
         if self.state is runQueueComplete:
             # All done
-            if self.rqexe.stats.failed:
-                logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and %d failed.", self.rqexe.stats.completed, self.rqexe.stats.skipped, self.rqexe.stats.failed)
-            else:
-                # Let's avoid the word "failed" if nothing actually did
-                logger.info("Tasks Summary: Attempted %d tasks of which %d didn't need to be rerun and all succeeded.", self.rqexe.stats.completed, self.rqexe.stats.skipped)
             return False
 
         if self.state is runQueueChildProcess: