diff mbox series

[yocto-autobuilder-helper,2/2] scripts/generate-testresult-index.py: expose regression reports on web page

Message ID 20230324090025.26366-3-alexis.lothore@bootlin.com
State New
Headers show
Series expose regression reports on web page | expand

Commit Message

Alexis Lothoré March 24, 2023, 9 a.m. UTC
From: Alexis Lothoré <alexis.lothore@bootlin.com>

When available, expose tesresult-regressions-report.txt on non-release web page,
as it is done for many other artifacts currently

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
 scripts/generate-testresult-index.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Richard Purdie March 24, 2023, 9:55 a.m. UTC | #1
On Fri, 2023-03-24 at 10:00 +0100, Alexis Lothoré via
lists.yoctoproject.org wrote:
> From: Alexis Lothoré <alexis.lothore@bootlin.com>
> 
> When available, expose tesresult-regressions-report.txt on non-release web page,
> as it is done for many other artifacts currently
> 
> Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
> ---
>  scripts/generate-testresult-index.py | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/generate-testresult-index.py b/scripts/generate-testresult-index.py
> index 09d2edb..122bac1 100755
> --- a/scripts/generate-testresult-index.py
> +++ b/scripts/generate-testresult-index.py
> @@ -30,6 +30,7 @@ index_template = """
>    <th>Type</th>
>    <th>Branch</th>
>    <th>Test Results Report</th>
> +  <th>Regressions Report</th>
>    <th>Performance Reports</th>
>    <th>ptest Logs</th>
>    <th>Buildhistory</th>
> @@ -43,6 +44,7 @@ index_template = """
>     <td>{% if entry[2] %} {{entry[2]}}{% endif %}</td>
>     <td>{% if entry[4] %} {{entry[4]}}{% endif %}</td>
>     <td> {% if entry[3] %}<a href="{{entry[3]}}">Report</a>{% endif %} </td>
> +   <td> {% if entry[9] %}<a href="{{entry[9]}}">Report</a>{% endif %} </td>
>     <td>
>     {% for perfrep in entry[6] %}
>       <a href="{{perfrep[0]}}">{{perfrep[1]}}</a>
> @@ -129,6 +131,10 @@ for build in sorted(os.listdir(path), key=keygen, reverse=True):
>      if os.path.exists(buildpath + "/testresult-report.txt"):
>          testreport = reldir + "testresults/testresult-report.txt"
>  
> +    regressionreport = ""
> +    if os.path.exists(buildpath + "/testresult-regressions-report.txt"):
> +        regressionreport = reldir + "testresults/testresult-regressions-report.txt"
> +
>      ptestlogs = []
>      ptestseen = []
>      for p in glob.glob(buildpath + "/*-ptest/*.log"):
> @@ -165,7 +171,7 @@ for build in sorted(os.listdir(path), key=keygen, reverse=True):
>  
>      branch = get_build_branch(buildpath)
>  
> -    entries.append((build, reldir, btype, testreport, branch, buildhistory, perfreports, ptestlogs, hd))
> +    entries.append((build, reldir, btype, testreport, branch, buildhistory, perfreports, ptestlogs, hd, regressionreport))
>  

In the interests of keeping that index page a manageable size, instead
of a new data column, I'd suggest we just add the link in the same TD
cell with the name "Regression"?

Cheers,

Richard
Alexis Lothoré March 24, 2023, 10:06 a.m. UTC | #2
Hi Richard,
On 3/24/23 10:55, Richard Purdie wrote:
> On Fri, 2023-03-24 at 10:00 +0100, Alexis Lothoré via
> lists.yoctoproject.org wrote:
>> From: Alexis Lothoré <alexis.lothore@bootlin.com>
>> -    entries.append((build, reldir, btype, testreport, branch, buildhistory, perfreports, ptestlogs, hd))
>> +    entries.append((build, reldir, btype, testreport, branch, buildhistory, perfreports, ptestlogs, hd, regressionreport))
>>  
> 
> In the interests of keeping that index page a manageable size, instead
> of a new data column, I'd suggest we just add the link in the same TD
> cell with the name "Regression"?

Sure, I will update it with your suggestion
diff mbox series

Patch

diff --git a/scripts/generate-testresult-index.py b/scripts/generate-testresult-index.py
index 09d2edb..122bac1 100755
--- a/scripts/generate-testresult-index.py
+++ b/scripts/generate-testresult-index.py
@@ -30,6 +30,7 @@  index_template = """
   <th>Type</th>
   <th>Branch</th>
   <th>Test Results Report</th>
+  <th>Regressions Report</th>
   <th>Performance Reports</th>
   <th>ptest Logs</th>
   <th>Buildhistory</th>
@@ -43,6 +44,7 @@  index_template = """
    <td>{% if entry[2] %} {{entry[2]}}{% endif %}</td>
    <td>{% if entry[4] %} {{entry[4]}}{% endif %}</td>
    <td> {% if entry[3] %}<a href="{{entry[3]}}">Report</a>{% endif %} </td>
+   <td> {% if entry[9] %}<a href="{{entry[9]}}">Report</a>{% endif %} </td>
    <td>
    {% for perfrep in entry[6] %}
      <a href="{{perfrep[0]}}">{{perfrep[1]}}</a>
@@ -129,6 +131,10 @@  for build in sorted(os.listdir(path), key=keygen, reverse=True):
     if os.path.exists(buildpath + "/testresult-report.txt"):
         testreport = reldir + "testresults/testresult-report.txt"
 
+    regressionreport = ""
+    if os.path.exists(buildpath + "/testresult-regressions-report.txt"):
+        regressionreport = reldir + "testresults/testresult-regressions-report.txt"
+
     ptestlogs = []
     ptestseen = []
     for p in glob.glob(buildpath + "/*-ptest/*.log"):
@@ -165,7 +171,7 @@  for build in sorted(os.listdir(path), key=keygen, reverse=True):
 
     branch = get_build_branch(buildpath)
 
-    entries.append((build, reldir, btype, testreport, branch, buildhistory, perfreports, ptestlogs, hd))
+    entries.append((build, reldir, btype, testreport, branch, buildhistory, perfreports, ptestlogs, hd, regressionreport))
 
     # Also ensure we have saved out log data for ptest runs to aid debugging
     if "ptest" in btype or btype in ["full", "quick"]: