Skip to content

Commit 9f37df0

Browse files
committed
step
1 parent 26026b5 commit 9f37df0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

extra/ci_inspect_logs.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def print_test_matrix(artifact, artifact_boards, title, sketch_filter=lambda x:
205205

206206
BOARD_MEM_REPORTS = defaultdict(dict) # { board: { region: [used, total] } }
207207
BOARD_CONFIGS = defaultdict(dict) # { board: { config_symbol: value } }
208-
REGIONS_FOR_SOC = defaultdict(set) # { soc: set(regions) }
208+
REGIONS_BY_SOC = defaultdict(set) # { soc: set(regions) }
209209

210210
def print_mem_report(artifact, artifact_boards):
211211
BASE_COLOR = 0x60
@@ -262,7 +262,8 @@ def color_entry(values):
262262
print(f"<td><code>{board}</code></td>")
263263
print(f"<td><pre>")
264264
for r in REGIONS_BY_SOC[soc]:
265-
print(f"{r:>20} {data[board].get(r, ['',''])[0]:8} {data[board].get(r, ['',''])[1]:8}")
265+
used, total = BOARD_MEM_REPORTS[board].get(r, ['',''])
266+
print(f"{r:>20} {used:8} {total:8}")
266267
print("</pre></td></tr>")
267268
print("</table></blockquote></details>")
268269

@@ -288,7 +289,7 @@ def color_entry(values):
288289
subarch = board_data['subarch']
289290

290291
# get board's config settings
291-
report_file = f"firmwares/zephyr-{variant}.config"
292+
report_file = f"zephyr-{variant}.config"
292293
try:
293294
with open(report_file, 'r') as f:
294295
for line in f:
@@ -309,7 +310,7 @@ def color_entry(values):
309310
board_data['soc'] = soc
310311

311312
# get board's memory report
312-
report_file = f"firmwares/zephyr-{variant}.meminfo"
313+
report_file = f"zephyr-{variant}.meminfo"
313314
try:
314315
with open(report_file, 'r') as f:
315316
report_data = json.load(f)
@@ -318,7 +319,7 @@ def color_entry(values):
318319
continue # Skip to the next board
319320

320321
BOARD_MEM_REPORTS[board] = { region.replace(':',''): [used, total] for region, used, total in report_data }
321-
REGIONS_FOR_SOC[soc].update(BOARD_MEM_REPORTS[board].keys())
322+
REGIONS_BY_SOC[soc].update(BOARD_MEM_REPORTS[board].keys())
322323

323324
# Get list of expected errors for this board/variant
324325
exceptions = []

0 commit comments

Comments
 (0)