Merge branch 'bugfix/restore_test_attr_psram_test_scopte' into 'master'

esp_common: restore test_attr test scope for psram

See merge request espressif/esp-idf!22546
This commit is contained in:
Armando (Dou Yiwen) 2023-03-02 11:21:26 +08:00
commit 6dc521325f
6 changed files with 80 additions and 21 deletions

View File

@ -115,7 +115,7 @@ static void check_spiram_contents(void)
TEST_ASSERT(error_count == 0);
}
TEST_CASE_MULTIPLE_STAGES("Spiram test noinit memory", "[spiram]", write_spiram_and_reset, check_spiram_contents);
TEST_CASE_MULTIPLE_STAGES("Spiram test noinit memory", "[psram][ld]", write_spiram_and_reset, check_spiram_contents);
#endif // CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY
@ -124,7 +124,7 @@ TEST_CASE_MULTIPLE_STAGES("Spiram test noinit memory", "[spiram]", write_spiram_
#define TEST_BSS_NUM (256 * 1024)
static EXT_RAM_BSS_ATTR uint32_t s_bss_buffer[TEST_BSS_NUM];
TEST_CASE("Test variables placed in external .bss segment", "[ld]")
TEST_CASE("Test variables placed in external .bss segment", "[psram][ld]")
{
for (int i = 0; i < TEST_BSS_NUM; i++) {
TEST_ASSERT(data_in_segment(&s_bss_buffer[i], &_ext_ram_bss_start, &_ext_ram_bss_end));

View File

@ -11,35 +11,81 @@ from pytest_embedded import Dut
'config',
[
'default'
]
],
indirect=True,
)
def test_esp_common(dut: Dut) -> None:
dut.run_all_single_board_cases()
# psram noinit attr tests with psram enabled
@pytest.mark.esp32
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'psram_noinit',
],
indirect=True,
)
def test_esp_attr_psram_noinit(dut: Dut) -> None:
dut.run_all_single_board_cases()
# psram noinit memory tests with psram enabled
@pytest.mark.esp32
@pytest.mark.generic
@pytest.mark.supported_targets
@pytest.mark.parametrize(
'config',
[
'psram_noinit'
],
indirect=True,
)
def run_multiple_stages(dut: Dut, test_case_num: int, stages: int) -> None:
dut.run_all_single_board_cases()
@pytest.mark.generic
# psram attr tests with psram enabled
@pytest.mark.esp32
@pytest.mark.parametrize(
'config',
[
'esp32_psram'
]
)
def test_esp_common_psram_esp32(dut: Dut) -> None:
dut.run_all_single_board_cases()
@pytest.mark.generic
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'esp32s2_psram'
]
'psram',
],
indirect=True,
)
def test_esp_common_psram_esp32s2(dut: Dut) -> None:
def test_esp_attr_psram(dut: Dut) -> None:
dut.run_all_single_board_cases()
# psram attr tests with xip_psram
@pytest.mark.esp32s2
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'xip_psram_esp32s2'
],
indirect=True,
)
def test_esp_attr_xip_psram_esp32s2(dut: Dut) -> None:
dut.run_all_single_board_cases()
# psram attr tests with xip_psram
@pytest.mark.esp32s3
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'xip_psram_esp32s3'
],
indirect=True,
)
def test_esp_attr_xip_psram_esp32s3(dut: Dut) -> None:
dut.run_all_single_board_cases()

View File

@ -0,0 +1,4 @@
# For EXT_RAM_BSS_ATTR
CONFIG_SPIRAM=y
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y

View File

@ -1,6 +1,6 @@
# For EXT_RAM_NOINIT_ATTR
CONFIG_IDF_TARGET="esp32"
CONFIG_SPIRAM=y
CONFIG_SPIRAM_OCCUPY_NO_HOST=y
CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=n
CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY=y
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y

View File

@ -1,5 +1,7 @@
# For XiP PSRAM EXT_RAM_BSS_ATTR
CONFIG_IDF_TARGET="esp32s2"
CONFIG_SPIRAM=y
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
CONFIG_SPIRAM_RODATA=y
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y

View File

@ -0,0 +1,7 @@
# For XiP PSRAM EXT_RAM_BSS_ATTR
CONFIG_IDF_TARGET="esp32s3"
CONFIG_SPIRAM=y
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y
CONFIG_SPIRAM_RODATA=y
CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y