From 44e2d244e823265eec40752b36632c8ca4ac304a Mon Sep 17 00:00:00 2001 From: "sonika.rathi" Date: Tue, 19 May 2026 15:09:31 +0200 Subject: [PATCH] fix(nvs_flash): scope NVS unity tests to correct CI configs --- components/nvs_flash/test_apps/main/test_nvs.c | 2 ++ components/nvs_flash/test_apps/pytest_nvs_flash.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/nvs_flash/test_apps/main/test_nvs.c b/components/nvs_flash/test_apps/main/test_nvs.c index 13093395ab7..790ef3c4762 100644 --- a/components/nvs_flash/test_apps/main/test_nvs.c +++ b/components/nvs_flash/test_apps/main/test_nvs.c @@ -43,6 +43,7 @@ extern int32_t get_heap_free_difference(const bool nvs_active_pool); static const char* TAG = "test_nvs"; +#if CONFIG_SPIRAM TEST_CASE("Kconfig option controls heap capability allocator for NVS", "[nvs_ram]") { // number of keys used for test @@ -105,6 +106,7 @@ TEST_CASE("Kconfig option controls heap capability allocator for NVS", "[nvs_ram TEST_ASSERT_GREATER_THAN_INT32(0, get_heap_free_difference(true)); TEST_ASSERT_GREATER_OR_EQUAL_INT32(0, get_heap_free_difference(false)); } +#endif // CONFIG_SPIRAM TEST_CASE("Partition name no longer than 16 characters", "[nvs]") { diff --git a/components/nvs_flash/test_apps/pytest_nvs_flash.py b/components/nvs_flash/test_apps/pytest_nvs_flash.py index 4124d503360..d95056904ed 100644 --- a/components/nvs_flash/test_apps/pytest_nvs_flash.py +++ b/components/nvs_flash/test_apps/pytest_nvs_flash.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import pytest from pytest_embedded_idf.dut import IdfDut @@ -9,14 +9,14 @@ from pytest_embedded_idf.utils import idf_parametrize @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) + dut.run_all_single_board_cases(group='!nvs_encr_hmac&!nvs_ram', timeout=120) @pytest.mark.generic @pytest.mark.parametrize('config', ['blockdev'], indirect=True) @idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target']) def test_nvs_flash_blockdev(dut: IdfDut) -> None: - dut.run_all_single_board_cases(group='!nvs_encr_hmac', timeout=120) + dut.run_all_single_board_cases(group='!nvs_encr_hmac&!nvs_ram', timeout=120) @pytest.mark.nvs_encr_hmac @@ -46,6 +46,7 @@ def test_nvs_flash_encr_flash_enc(dut: IdfDut) -> None: @pytest.mark.psram +@pytest.mark.parametrize('config', ['spiram'], indirect=True) @idf_parametrize('target', ['esp32'], indirect=['target']) def test_nvs_flash_ram(dut: IdfDut) -> None: dut.run_all_single_board_cases(group='nvs_ram')