mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-04 22:30:13 +03:00
The otatool pytest closes the serial port and then immediately launches
otatool_example.py as a subprocess that re-opens the same port via
esptool. This fails intermittently because pytest-embedded's
QueueFeederThread may still hold the FD when close() returns, and the
OS has not fully released the serial port by the time the subprocess
tries to open it.
Add a delay after serial close and a 3-attempt retry loop around the
subprocess to handle transient serial port contention.
(cherry picked from commit 926d5ee6ad)