mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
fix(examples): add flaky reruns to nvs_rw_value pytest for CI flash
This commit is contained in:
@@ -9,6 +9,7 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.flaky(reruns=2, reruns_delay=5)
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_examples_nvs_rw_value(dut: Dut) -> None:
|
||||
dut.serial.erase_flash()
|
||||
|
||||
@@ -9,15 +9,16 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.flaky(reruns=2, reruns_delay=5)
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_examples_nvs_rw_value_cxx(dut: Dut) -> None:
|
||||
dut.serial.erase_flash()
|
||||
dut.serial.flash()
|
||||
for i, counter_state in zip_longest(range(4), ('The value is not initialized yet!',), fillvalue='Done'):
|
||||
dut.expect('Opening Non-Volatile Storage \\(NVS\\) handle... Done', timeout=20)
|
||||
dut.expect('Reading restart counter from NVS ... {}'.format(counter_state), timeout=20)
|
||||
dut.expect('Restart counter = {}'.format(i) if int(i) > 0 else '', timeout=20)
|
||||
dut.expect(f'Reading restart counter from NVS ... {counter_state}', timeout=20)
|
||||
dut.expect(f'Restart counter = {i}' if int(i) > 0 else '', timeout=20)
|
||||
dut.expect('Updating restart counter in NVS ... Done', timeout=20)
|
||||
dut.expect('Committing updates in NVS ... Done', timeout=20)
|
||||
dut.expect('Restarting in 10 seconds...', timeout=20)
|
||||
logging.info('loop {} has finished'.format(i))
|
||||
logging.info(f'loop {i} has finished')
|
||||
|
||||
Reference in New Issue
Block a user