File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,9 @@ def main():
352352 if fails :
353353 ret = 1
354354
355+ print ("Erasing flash after tests..." )
356+ flash_erase ()
357+
355358 return ret
356359
357360
Original file line number Diff line number Diff line change @@ -237,6 +237,7 @@ def parse_line(line):
237237
238238
239239def main ():
240+ ret = 0
240241 connect_serial ()
241242
242243 if FLASH_ERASE_FLAG :
@@ -257,10 +258,15 @@ def main():
257258
258259 if deep_sleep >= DEEP_SLEEP_PERCENTAGE :
259260 print (Fore .GREEN + f"Deep sleep is higher than { DEEP_SLEEP_PERCENTAGE } %, this is good! ✅" + Style .RESET_ALL )
260- return 0
261+ ret = 0
261262 else :
262263 print (Fore .RED + f"Deep sleep is lower than { DEEP_SLEEP_PERCENTAGE } %, this is bad! ❌" + Style .RESET_ALL )
263- return 1
264+ ret = 1
265+
266+ print ("Erasing flash after tests..." )
267+ erase_flash ()
268+
269+ return ret
264270
265271
266272if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments