All of lore.kernel.org
 help / color / mirror / Atom feed
From: sakib.sajal@windriver.com
To: <yocto@lists.yoctoproject.org>
Subject: [PATCH yocto-autobuilder-helper 4/4] generate-testresult-index.py: publish host data collected by collect-data template
Date: Tue, 13 Apr 2021 13:02:10 -0400	[thread overview]
Message-ID: <20210413170210.72845-4-sakib.sajal@windriver.com> (raw)
In-Reply-To: <20210413170210.72845-1-sakib.sajal@windriver.com>

Add a column "Host Data" to publish the host data collected.

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
 scripts/generate-testresult-index.py | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/scripts/generate-testresult-index.py b/scripts/generate-testresult-index.py
index d9d577e..7fdc17c 100755
--- a/scripts/generate-testresult-index.py
+++ b/scripts/generate-testresult-index.py
@@ -33,6 +33,7 @@ index_templpate = """
   <th>Performance Reports</th>
   <th>ptest Logs</th>
   <th>Buildhistory</th>
+  <th>Host Data</th>
 </tr>
 </thead>
 <tdata>
@@ -57,6 +58,11 @@ index_templpate = """
      <a href="{{bh[0]}}">{{bh[1]}}</a>
    {% endfor %}
    </td>
+   <td>
+   {% for hd in entry[8] %}
+     <a href="{{hd[0]}}">{{hd[1]}}</a>
+   {% endfor %}
+   </td>
 </tr>
 {% endfor %}
 </tdata>
@@ -145,9 +151,19 @@ for build in sorted(os.listdir(path), key=keygen, reverse=True):
     if os.path.exists(buildpath + "/qemuarm/buildhistory.txt"):
         buildhistory.append((reldir + "testresults/qemuarm/buildhistory.txt", "qemuarm"))
 
+    hd = []
+    counter = 0
+    # do we really need the loop?
+    for p in glob.glob(buildpath + "/*/*/host_stats*top.txt"):
+        n_split = p.split(build)
+        res = reldir[0:-1] + n_split[1]
+        hd.append((res, str(counter)))
+        counter += 1
+
+
     branch = get_build_branch(buildpath)
 
-    entries.append((build, reldir, btype, testreport, branch, buildhistory, perfreports, ptestlogs))
+    entries.append((build, reldir, btype, testreport, branch, buildhistory, perfreports, ptestlogs, hd))
 
     # Also ensure we have saved out log data for ptest runs to aid debugging
     if "ptest" in btype or btype in ["full", "quick"]:
-- 
2.25.1


  parent reply	other threads:[~2021-04-13 17:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 17:02 [PATCH yocto-autobuilder-helper 1/4] config.json: add "collect-data" template sakib.sajal
2021-04-13 17:02 ` [PATCH yocto-autobuilder-helper 2/4] config.json: collect data by default sakib.sajal
2021-04-16  8:28   ` [yocto] " Richard Purdie
     [not found]   ` <1676495329CC3E3C.31742@lists.yoctoproject.org>
2021-04-16  9:05     ` Richard Purdie
2021-04-13 17:02 ` [PATCH yocto-autobuilder-helper 3/4] collect-results: collect "host_stats" files generated by collect-data template sakib.sajal
2021-04-13 17:02 ` sakib.sajal [this message]
2021-04-15 13:52 ` [yocto] [PATCH yocto-autobuilder-helper 1/4] config.json: add "collect-data" template Richard Purdie
2021-04-15 15:31   ` sakib.sajal
2021-04-15 15:55     ` Richard Purdie
2021-04-15 17:55       ` Randy MacLeod
2021-04-15 20:48         ` Randy MacLeod
2021-04-16 21:35           ` Randy MacLeod
2021-04-20 21:50           ` [yocto] [PATCH yocto-autobuilder-helper 1/4] config.json: add "collect-data" template -- Build: 20210420-1 Randy MacLeod

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210413170210.72845-4-sakib.sajal@windriver.com \
    --to=sakib.sajal@windriver.com \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.