Files
esp-idf/components/nvs_flash/test_apps/pytest_nvs_flash.py
Fu Hanxi a5257dcc39 ci: apply idf-ci pytest plugin
Removed

- target markers. Now must use target as parametrization in esp-idf
- host test markers. Now will be automatically added with linux target and qemu marker
2025-07-09 10:33:28 +02:00

45 lines
1.6 KiB
Python

# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import pytest
from pytest_embedded_idf.dut import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic
@pytest.mark.parametrize('config', ['default'], indirect=True)
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_nvs_flash(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='!nvs_encr_hmac', timeout=120)
@pytest.mark.nvs_encr_hmac
@pytest.mark.parametrize('config', ['nvs_encr_hmac_esp32c3'], indirect=True)
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
def test_nvs_flash_encr_hmac(dut: IdfDut) -> None:
dut.run_all_single_board_cases()
@pytest.mark.nvs_encr_hmac
@pytest.mark.parametrize('config', ['nvs_encr_hmac_no_cfg_esp32c3'], indirect=True)
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
def test_nvs_flash_encr_hmac_no_cfg(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='nvs_encr_hmac', timeout=120)
@pytest.mark.flash_encryption
@idf_parametrize(
'config,target',
[('nvs_encr_flash_enc_esp32', 'esp32'), ('nvs_encr_flash_enc_esp32c3', 'esp32c3')],
indirect=['config', 'target'],
)
def test_nvs_flash_encr_flash_enc(dut: IdfDut) -> None:
# Erase the nvs_key partition
dut.serial.erase_partition('nvs_key')
dut.run_all_single_board_cases()
@pytest.mark.psram
@idf_parametrize('target', ['esp32'], indirect=['target'])
def test_nvs_flash_ram(dut: IdfDut) -> None:
dut.run_all_single_board_cases(group='nvs_ram')