@@ -139,13 +139,38 @@ def process_build_reports():
139139 artifacts = set (item ['artifact' ] for item in ALL_BOARD_DATA )
140140
141141 # Print the recap table
142- for artifact in sorted (list (artifacts ), reverse = True ):
143- print (f"### `{ artifact } ` test results:" )
142+ print ("<table>\n <tr><th>Artifact</th><th>Board</th><th>Status</th><th>Tests</th><th>Warnings</th><th>Errors</th></tr>" )
144143
145- # 4. Inner Loop: Filter board data for the current artifact
144+ for artifact in sorted ( list ( artifacts ), reverse = True ):
146145 artifact_boards = [item for item in ALL_BOARD_DATA if item ['artifact' ] == artifact ]
147146
148- print ()
147+ first_line = True
148+ for board in artifact_boards :
149+ print (f"<tr>" , f"<td rowspan='{ len (artifact_boards )} '><code>{ artifact } </code></td>" if first_line else "" )
150+ first_line = False
151+
152+ board_name = board ['board' ]
153+ summary = BOARD_SUMMARY [board_name ]
154+ job_link = summary ['job_link' ]
155+ board_icon = summary ['icon' ]
156+ board_link = f"<a href='{ job_link } '>{ board_name } </a>" if job_link else board_name
157+
158+ print (f"<td><code>{ board_link } </code></td><td align='center'>{ board_icon } </td>" )
159+ if board_icon == ":fire:" :
160+ print (f"<td colspan=3>{ TEST_MATRIX ['CI test' ][board_name ]['issues' ][0 ]} </td></tr>" )
161+ else :
162+ print (f"<td align='right'>{ (summary ['tests' ] - summary ['errors' ]) or '-' } </td><td align='right'>{ summary ['warnings' ] or '-' } </td><td align='right'>{ summary ['errors' ] or '-' } </td></tr>" )
163+ print ("</table>\n " )
164+
165+ for artifact in sorted (list (artifacts ), reverse = True ):
166+
167+ artifact_boards = [ item for item in ALL_BOARD_DATA
168+ if item ['artifact' ] == artifact and BOARD_SUMMARY [item ['board' ]]['icon' ] != ":fire:" ]
169+
170+ if not artifact_boards :
171+ continue
172+
173+ print (f"### `{ artifact } ` test results:" )
149174
150175 # Print the test matrix
151176
@@ -164,7 +189,9 @@ def process_build_reports():
164189 print ("<table>" )
165190 print (header_row )
166191
167- for sketch_name , board_results in TEST_MATRIX .items ():
192+ artifact_matrix = { sketch : results for sketch , results in TEST_MATRIX .items () if any (board_data ['board' ] in results for board_data in artifact_boards ) }
193+
194+ for sketch_name , board_results in artifact_matrix .items ():
168195 sketch_icon = None
169196 row_data = ""
170197 for board_data in artifact_boards :
@@ -187,7 +214,7 @@ def process_build_reports():
187214 print (f"<details><summary><b>Error and warning logs for <code>{ artifact } </code></b></summary>" )
188215 print ("<table>" )
189216 print ("<tr><th>Sketch</th><th>Build Details</th></tr>" )
190- for sketch_name , board_results in TEST_MATRIX .items ():
217+ for sketch_name , board_results in artifact_matrix .items ():
191218 row_open = False
192219 for board_data in artifact_boards :
193220 board_name = board_data ['board' ]
0 commit comments