Skip to content

Commit d63dbd3

Browse files
committed
step
1 parent 044da52 commit d63dbd3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

extra/ci_collect_logs.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import json
66
import re
77

8+
EXPECTED_ERROR = -2
89
SKIP = -1
910
PASS = 0
1011
WARNING = 1
@@ -16,6 +17,7 @@
1617
":yellow_circle:",
1718
":red_circle:",
1819
":fire:",
20+
"[:red_circle:]", # -2
1921
":new_moon:" # -1
2022
]
2123

@@ -24,6 +26,7 @@
2426
":grey_exclamation:",
2527
":x:",
2628
":fire:",
29+
"[:x:]", # -2
2730
":new_moon:" # -1
2831
]
2932

@@ -49,6 +52,7 @@ def example_name(sketch_name):
4952

5053
TEST_MATRIX = {}
5154
BOARD_SUMMARY = {}
55+
EXPECTED_ERRORS = set()
5256

5357
def log_test(name, board, status, issues, job_link=None):
5458
"""
@@ -59,6 +63,7 @@ def log_test(name, board, status, issues, job_link=None):
5963
BOARD_SUMMARY[board] = {
6064
'tests': 0,
6165
'errors': 0,
66+
'errors-expected': 0,
6267
'warnings': 0,
6368
'job_link': job_link,
6469
'status': 0
@@ -73,7 +78,11 @@ def log_test(name, board, status, issues, job_link=None):
7378
if status == WARNING:
7479
board_info['warnings'] += 1
7580
elif status == ERROR:
76-
board_info['errors'] += 1
81+
if (board, name) in EXPECTED_ERRORS:
82+
board_info['errors-expected'] += 1
83+
status = EXPECTED_ERROR
84+
else:
85+
board_info['errors'] += 1
7786

7887
board_info['status'] = max(board_info['status'], status)
7988

0 commit comments

Comments
 (0)