Tools/HIL/run_nsh_cmd.py handle missing echo, but cmd succeeded

This commit is contained in:
Daniel Agar 2021-07-19 10:15:06 -04:00
parent 87610957a4
commit 1a222bf06e
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,10 @@ def do_nsh_cmd(port, baudrate, cmd):
if cmd in serial_line:
break
elif serial_line.startswith(success_cmd) and len(serial_line) <= len(success_cmd) + 2:
print_line(serial_line)
# we missed the echo, but command ran and succeeded
sys.exit(0)
else:
if len(serial_line) > 0:
print_line(serial_line)