The esptool version bundled with the release/v5.5 IDF environment only
accepts the underscore subcommand name 'write_flash'. The hyphenated
alias 'write-flash' was added in later esptool releases, so the CI
target test failed with 'argparse.ArgumentError: invalid choice:
write-flash'. Use the canonical 'write_flash' name, which is accepted
by all esptool versions.
Replace erase_nvs + SNTP time sync with direct NVS timestamp injection
from the pytest host. This eliminates CI flakiness caused by NTP servers
being unreachable from the CI lab network.
Changes:
- Add write_time_to_nvs() helper that generates an NVS partition image
with the current host timestamp and flashes it to the DUT before each
test. The firmware reads this via the existing update_time_from_nvs()
path and skips SNTP entirely.
- Remove @pytest.mark.parametrize('erase_nvs', ['y']) from all 4
Ethernet-based tests since NVS is now written with valid data.
This commit refactors the script responsible for starting a Python-based HTTPS server
to align with the latest Python version's requirements and best practices.
Closes https://github.com/espressif/esp-idf/issues/13575