summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2019-11-14 16:15:37 +0900
committerYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2019-11-14 16:15:37 +0900
commit03f9ca8370c91eb117aacddc407bfd034e2f7a3d (patch)
treecdb90bc6e3739f72fc278bd368d8cb456c624e10 /scripts
parent49343d20d90bed7285c6ea0fa447b23b20efe92e (diff)
scripts: html.py: Change counting of "upstream" and "done"
Even if the tasks' status is "New", "Active", "Blocked" or "Paused", the def bsp on htmi.py increases cnt_{up,all} when task_commit_upstream returns non-zero. However, these countings are possible to overlook which bsp patches are still in progress. So, this patch changes the task done counting. Also adds task's status related upported patches counting like below: bsp:184/upstream:160 = 87.0% --> keep as-is. task:57/done:43 = 75.4% (bsp:184/upstream:106 = 57.6%) ~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ changed add Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/html.py39
1 files changed, 23 insertions, 16 deletions
diff --git a/scripts/html.py b/scripts/html.py
index dafe5a4..07727d0 100755
--- a/scripts/html.py
+++ b/scripts/html.py
@@ -463,23 +463,26 @@ class periject_html(base.base):
# task_commit_upstream
#--------------------
def task_commit_upstream(self, v):
+ done = 0
+ cnt = 0
+ status = v.get_data("status")
+ if (status == "Done" or
+ status == "Abandoned"):
+ done = 1
+
upstream = v.get_data("upstream")
if (not len(upstream)):
- status = v.get_data("status")
- if (status == "Done" or
- status == "Abandoned"):
+ if (done):
html("p").print("ignored")
- return 1
- return 0
+ cnt = 1
+ else:
+ with html("table"):
+ for up in upstream:
+ cnt += self.__task_commit_upstream(v, up, "torvalds")
+ for up in upstream:
+ cnt += self.__task_commit_upstream(v, up, "next")
- cnt = 0
- with html("table"):
- for up in upstream:
- cnt += self.__task_commit_upstream(v, up, "torvalds")
- for up in upstream:
- cnt += self.__task_commit_upstream(v, up, "next")
-
- return cnt
+ return (done, cnt)
#--------------------
# task_commit
@@ -569,6 +572,7 @@ class periject_html(base.base):
a = html("a", {"target":"subbody"})
cnt_bsp = 0
cnt_up = 0
+ cnt_upd = 0
cnt_all = 0
cnt_done= 0
tmp = 0
@@ -602,13 +606,16 @@ class periject_html(base.base):
cnt_bsp += tmp
with html("td"):
- up = self.task_commit_upstream(v)
- if (up):
+ (done, cnt) = self.task_commit_upstream(v)
+ if (cnt):
cnt_up += tmp
+ if (done):
cnt_done += 1
+ cnt_upd += tmp
html("p").print("bsp:{}/upstream:{} = {:.1f}%".format(cnt_bsp, cnt_up, cnt_up * 100 /cnt_bsp))
- html("p").print("task:{}/done:{} = {:.1f}%".format(cnt_all, cnt_done, cnt_done * 100 /cnt_all))
+ html("p").print("task:{}/done:{} = {:.1f}% (bsp:{}/upstream:{} = {:.1f}%)".format(cnt_all, cnt_done, cnt_done * 100 /cnt_all,
+ cnt_bsp, cnt_upd, cnt_upd * 100 /cnt_bsp))
#--------------------
# print