90
90
91
91
# error or fatal error
92
92
fork_pattern = re .compile (r"^Error during build: fork/exec" )
93
- error_pattern = re .compile (r":\d+:\d*:?\s.*error:\s|^Error:" )
93
+ error_pattern = re .compile (r":\d+:\d*:?\s.*error:\s|^Error:|fatal error: " )
94
94
ld_pattern = re .compile ("arm-none-eabi/bin/ld:" )
95
95
overflow_pattern = re .compile (
96
96
r"(will not fit in |section .+ is not within )?region( .+ overflowed by [\d]+ bytes)?"
@@ -584,6 +584,7 @@ def check_status(status, build_conf, boardKo, nb_build_conf):
584
584
# Check if failed due to a region overflowed
585
585
logFile = build_conf [idx_log ] / f"{ sketch_name } .log"
586
586
error_found = False
587
+ overflow_found = False
587
588
for i , line in enumerate (open (logFile )):
588
589
if error_pattern .search (line ):
589
590
error_found = True
@@ -593,17 +594,20 @@ def check_status(status, build_conf, boardKo, nb_build_conf):
593
594
# If one ld line is not for region overflowed --> failed
594
595
if overflow_pattern .search (line ) is None :
595
596
error_found = True
597
+ else :
598
+ overflow_found = True
596
599
if error_found :
597
- result = ffail
598
- boardKo .append (build_conf [idx_b_name ])
599
- if args .ci :
600
- cat (logFile )
601
- nb_build_failed += 1
602
600
break
603
- else :
604
- # else consider it succeeded
601
+ # Succeeded if overflow is found and no other error found
602
+ if overflow_found and not error_found :
605
603
result = "\033 [32msucceeded*\033 [0m"
606
604
nb_build_passed += 1
605
+ else :
606
+ result = ffail
607
+ boardKo .append (build_conf [idx_b_name ])
608
+ if args .ci :
609
+ cat (logFile )
610
+ nb_build_failed += 1
607
611
else :
608
612
result = "\033 [31merror\033 [0m"
609
613
boardKo .append (build_conf [idx_b_name ])
0 commit comments