From 9535bbe976e2aadbc28ff696ae6b404b3d6169c8 Mon Sep 17 00:00:00 2001 From: "sonika.rathi" Date: Wed, 29 Apr 2026 10:26:27 +0200 Subject: [PATCH] fix(examples): hard-reset before nvs_bootloader pytest expectations --- examples/storage/nvs/nvs_bootloader/pytest_nvs_bootloader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/storage/nvs/nvs_bootloader/pytest_nvs_bootloader.py b/examples/storage/nvs/nvs_bootloader/pytest_nvs_bootloader.py index 6ea2a692c9c..fadfa1e1a9f 100644 --- a/examples/storage/nvs/nvs_bootloader/pytest_nvs_bootloader.py +++ b/examples/storage/nvs/nvs_bootloader/pytest_nvs_bootloader.py @@ -8,6 +8,10 @@ from pytest_embedded_idf.utils import idf_parametrize @pytest.mark.generic @idf_parametrize('target', ['supported_targets'], indirect=['target']) def test_nvs_bootloader_example(dut: Dut) -> None: + # Full bootloader hook logs must be visible before app output. On some targets (e.g. ESP32-H2) + # the default post-flash boot can finish before the serial capture window aligns; reset once + # so expectations always match output from a captured cold boot. + dut.serial.hard_reset() # Expect to read hooks messages and data from NVS partition dut.expect_exact('Before reading from NVS partition') dut.expect_exact('Result data. Return code: ESP_OK')