mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 20:59:50 +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:
committed by
GitHub
parent
15f92f765d
commit
4ade0fc76d
@@ -20,14 +20,12 @@ def main():
|
||||
logging.error("Flipper not found!")
|
||||
sys.exit(1)
|
||||
|
||||
with serial.Serial(flp_serial, timeout=10) as flipper:
|
||||
with serial.Serial(flp_serial, timeout=150) as flipper:
|
||||
logging.info(f"Found Flipper at {flp_serial}")
|
||||
flipper.baudrate = 230400
|
||||
flipper.flushOutput()
|
||||
flipper.flushInput()
|
||||
|
||||
flipper.timeout = 300
|
||||
|
||||
flipper.read_until(b">: ").decode("utf-8")
|
||||
flipper.write(b"unit_tests\r")
|
||||
data = flipper.read_until(b">: ").decode("utf-8")
|
||||
|
||||
Reference in New Issue
Block a user