[PATCH yocto-autobuilder-helper 4/4] scripts/generate-testresult-index.py: update index to list host data


sakib.sajal@...
 

Host data is collected on failure by default. List the collected files
in the index.

Signed-off-by: Sakib Sajal <sakib.sajal@...>
---
scripts/generate-testresult-index.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/scripts/generate-testresult-index.py b/scripts/generate-testresult-index.py
index d85d606..5c33778 100755
--- a/scripts/generate-testresult-index.py
+++ b/scripts/generate-testresult-index.py
@@ -152,13 +152,15 @@ for build in sorted(os.listdir(path), key=keygen, reverse=True):
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_summary.txt"):
+ for p in glob.glob(buildpath + "/*/*/host_stats*summary.txt"):
n_split = p.split(build)
res = reldir[0:-1] + n_split[1]
- hd.append((res, str(counter)))
- counter += 1
+ n = os.path.basename(p).split("host_stats_")[-1]
+ if "failure" in n:
+ n = n.split("_summary.txt")[0]
+ elif "top" in n:
+ n = n.split("_top_summary.txt")[0]
+ hd.append((res, n))


branch = get_build_branch(buildpath)
--
2.25.1

Join yocto@lists.yoctoproject.org to automatically receive all group messages.