From d076b34ed066642d781901b9c44f74e6a252b4f0 Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Thu, 18 Apr 2024 14:09:13 +0800 Subject: [PATCH] feat(esp_pm): add cases to test coexistence of sleep and PSRAM features --- .../test_apps/esp_pm/main/CMakeLists.txt | 2 +- .../esp_pm/test_apps/esp_pm/pytest_esp_pm.py | 28 +++++++++++++++++++ .../esp_pm/sdkconfig.ci.pm_xip_psram_esp32s2 | 6 ++++ .../esp_pm/sdkconfig.ci.pm_xip_psram_esp32s3 | 6 ++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 components/esp_pm/test_apps/esp_pm/sdkconfig.ci.pm_xip_psram_esp32s2 create mode 100644 components/esp_pm/test_apps/esp_pm/sdkconfig.ci.pm_xip_psram_esp32s3 diff --git a/components/esp_pm/test_apps/esp_pm/main/CMakeLists.txt b/components/esp_pm/test_apps/esp_pm/main/CMakeLists.txt index 5cab931963..48c7ad8ed7 100644 --- a/components/esp_pm/test_apps/esp_pm/main/CMakeLists.txt +++ b/components/esp_pm/test_apps/esp_pm/main/CMakeLists.txt @@ -5,5 +5,5 @@ set(sources "test_app_main.c" # the component must be registered as a WHOLE_ARCHIVE idf_component_register(SRCS ${sources} INCLUDE_DIRS "." - PRIV_REQUIRES unity esp_pm ulp driver esp_timer + PRIV_REQUIRES unity esp_pm ulp driver esp_timer esp_psram WHOLE_ARCHIVE) diff --git a/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py b/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py index 466fbef64e..9d7ff9eaff 100644 --- a/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py +++ b/components/esp_pm/test_apps/esp_pm/pytest_esp_pm.py @@ -14,3 +14,31 @@ from pytest_embedded import Dut ], indirect=True) def test_esp_pm(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', + [ + 'pm_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', + [ + 'pm_xip_psram_esp32s3' + ], + indirect=True, +) +def test_esp_attr_xip_psram_esp32s3(dut: Dut) -> None: + dut.run_all_single_board_cases() diff --git a/components/esp_pm/test_apps/esp_pm/sdkconfig.ci.pm_xip_psram_esp32s2 b/components/esp_pm/test_apps/esp_pm/sdkconfig.ci.pm_xip_psram_esp32s2 new file mode 100644 index 0000000000..51f7a5a045 --- /dev/null +++ b/components/esp_pm/test_apps/esp_pm/sdkconfig.ci.pm_xip_psram_esp32s2 @@ -0,0 +1,6 @@ +CONFIG_IDF_TARGET="esp32s2" +CONFIG_SPIRAM=y +CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y +CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y +CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y +CONFIG_SPIRAM_RODATA=y diff --git a/components/esp_pm/test_apps/esp_pm/sdkconfig.ci.pm_xip_psram_esp32s3 b/components/esp_pm/test_apps/esp_pm/sdkconfig.ci.pm_xip_psram_esp32s3 new file mode 100644 index 0000000000..31f93b5876 --- /dev/null +++ b/components/esp_pm/test_apps/esp_pm/sdkconfig.ci.pm_xip_psram_esp32s3 @@ -0,0 +1,6 @@ +CONFIG_IDF_TARGET="esp32s3" +CONFIG_SPIRAM=y +CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y +CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y +CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y +CONFIG_SPIRAM_RODATA=y