Skip to content

Commit 2f77791

Browse files
committed
step
1 parent f570540 commit 2f77791

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

extra/ci_collect_logs.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ def example_name(sketch_name):
6161

6262
TEST_MATRIX = {}
6363
BOARD_SUMMARY = {}
64-
EXPECTED_ERRORS = set()
6564

66-
def log_test(name, board, status, issues, job_link=None):
65+
def log_test(name, board, exceptions, status, issues, job_link=None):
6766
"""
6867
Logs individual test results into the TEST_MATRIX dictionary.
6968
"""
@@ -87,21 +86,20 @@ def log_test(name, board, status, issues, job_link=None):
8786
if status == WARNING:
8887
board_info['warnings'] += 1
8988
elif status == ERROR:
90-
if (board, name) in EXPECTED_ERRORS:
89+
if any(pattern.match(name) for pattern in exceptions):
9190
board_info['expected-errors'] += 1
9291
status = EXPECTED_ERROR
9392
else:
9493
board_info['errors'] += 1
9594

9695
board_info['status'] = max(board_info['status'], status)
9796

98-
if name not in TEST_MATRIX:
99-
TEST_MATRIX[name] = {}
100-
101-
TEST_MATRIX[name][board] = {
97+
sketch_tests = TEST_MATRIX.get(name, {})
98+
sketch_tests[board] = {
10299
'status': status,
103100
'issues': issues
104101
}
102+
TEST_MATRIX[name] = sketch_tests
105103

106104
# --- Main Logic ---
107105

@@ -127,12 +125,17 @@ def process_build_reports():
127125
subarch = board_data['subarch']
128126

129127
# Get list of expected errors for this board/variant
128+
exceptions = []
130129
if os.path.exists(f"ArduinoCore-zephyr/variants/{variant}/known_example_issues.txt"):
130+
print(f"found ArduinoCore-zephyr/variants/{variant}/known_example_issues.txt")
131131
with open(f"ArduinoCore-zephyr/variants/{variant}/known_example_issues.txt", 'r') as f:
132132
for line in f:
133-
sketch_name = line.split('#')[0].strip()
134-
if sketch_name:
135-
EXPECTED_ERRORS.add((board, sketch_name))
133+
sketch_name_pattern = line.split('#')[0].strip()
134+
if sketch_name_pattern:
135+
print(f"Adding expected error pattern: {sketch_name_pattern}", file=sys.stderr)
136+
exceptions.append(re.compile(f"^(ArduinoCore-zephyr/)?{sketch_name_pattern}"))
137+
else:
138+
print(f"ArduinoCore-zephyr/variants/{variant}/known_example_issues.txt not found")
136139

137140
# Get raw data from report file
138141
REPORT_FILE = f"arduino-{subarch}-{board}.json"
@@ -165,7 +168,6 @@ def process_build_reports():
165168
# Replace long absolute paths with '...' for brevity.
166169
sketch_issues = [ re.sub(r'(/.+?)((/[^/]+){3}):', r'...\2:', issue) for issue in issues ]
167170

168-
# Logic to update counters and DETAILS string
169171
if not compilation_success:
170172
status = ERROR
171173
elif len(sketch_issues): # Implies warnings/non-critical issues

variants/arduino_opta_stm32h747xx_m7/known_example_issues.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44

55
ArduinoCore-zephyr/libraries/Ethernet/examples/UDPSendReceiveString
66
ArduinoCore-zephyr/libraries/Ethernet/examples/UdpNtpClient
7+
ArduinoCore-zephyr/libraries/Storage/examples/ListFiles
8+
ArduinoCore-zephyr/libraries/Storage/examples/PartitionInfo

variants/arduino_opta_stm32h747xx_m7/skip_these_examples.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
# for example because it uses hardware features not present on the CPU or board.
44

55
libraries/Camera
6-
libraries/Storage # FIXME

variants/arduino_portenta_h7_stm32h747xx_m7/known_example_issues.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44

55
ArduinoCore-zephyr/libraries/Ethernet/examples/UDPSendReceiveString
66
ArduinoCore-zephyr/libraries/Ethernet/examples/UdpNtpClient
7+
ArduinoCore-zephyr/libraries/Storage/examples/ListFiles
8+
ArduinoCore-zephyr/libraries/Storage/examples/PartitionInfo
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# This file contains a list of examples that are shipped with the core (or used
22
# by continuous integration tests), but are not applicable for this variant,
33
# for example because it uses hardware features not present on the CPU or board.
4-
5-
libraries/Storage # FIXME

0 commit comments

Comments
 (0)