1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 20:49:49 +04:00

[FL-3421] Unit bench: multiple attempts to find flipper (#2960)

* Unit bench: added retry count for finding flipper for reboot/reboot2dfu and power off scripts. Changed returns to sys.exit() since scripts are being used standalone
* fixed typo in await flipper and changed debug level to info for searching flipper in power.py
* reversed return operator instead of sys.exit, changed app.py exit behavior
* test run to see if exit(1) fails the run
* reversed test changes, fixed flipper name and increased await flipper timeout
* await after flash increase
* increased serial timeout
* increased serial timeout, apparently it is for entire run

Co-authored-by: doomwastaken <k.volkov@flipperdevices.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Konstantin Volkov
2023-08-23 15:51:02 +03:00
committed by GitHub
parent 15f92f765d
commit 4ade0fc76d
4 changed files with 29 additions and 15 deletions

View File

@@ -22,14 +22,14 @@ def flp_serial_by_name(flp_name):
if os.path.exists(flp_serial):
return flp_serial
else:
logging.info(f"Couldn't find {logging.info} on this attempt.")
logging.info(f"Couldn't find {flp_name} on this attempt.")
if os.path.exists(flp_name):
return flp_name
else:
return ""
UPDATE_TIMEOUT = 60 * 4 # 4 minutes
UPDATE_TIMEOUT = 30 * 4 # 4 minutes
def main():
@@ -50,7 +50,7 @@ def main():
if flipper == "":
logging.error("Flipper not found!")
sys.exit(1)
exit(1)
logging.info(f"Found Flipper at {flipper}")