ci: update configs to include/exclude esp_pm in unit test

This commit is contained in:
Renz Bagaporo
2020-07-22 15:23:39 +08:00
committed by bot
parent 6462f9bfe1
commit f33f49331f
15 changed files with 29 additions and 12 deletions

View File

@@ -523,8 +523,10 @@ menu "ESP32-specific"
config ESP32_TIME_SYSCALL_USE_RTC_FRC1 config ESP32_TIME_SYSCALL_USE_RTC_FRC1
bool "RTC and high-resolution timer" bool "RTC and high-resolution timer"
select ESP_TIMER_RTC_USE
config ESP32_TIME_SYSCALL_USE_RTC config ESP32_TIME_SYSCALL_USE_RTC
bool "RTC" bool "RTC"
select ESP_TIMER_RTC_USE
config ESP32_TIME_SYSCALL_USE_FRC1 config ESP32_TIME_SYSCALL_USE_FRC1
bool "High-resolution timer" bool "High-resolution timer"
config ESP32_TIME_SYSCALL_USE_NONE config ESP32_TIME_SYSCALL_USE_NONE

View File

@@ -392,8 +392,10 @@ menu "ESP32S2-specific"
config ESP32S2_TIME_SYSCALL_USE_RTC_FRC1 config ESP32S2_TIME_SYSCALL_USE_RTC_FRC1
bool "RTC and high-resolution timer" bool "RTC and high-resolution timer"
select ESP_TIMER_RTC_USE
config ESP32S2_TIME_SYSCALL_USE_RTC config ESP32S2_TIME_SYSCALL_USE_RTC
bool "RTC" bool "RTC"
select ESP_TIMER_RTC_USE
config ESP32S2_TIME_SYSCALL_USE_FRC1 config ESP32S2_TIME_SYSCALL_USE_FRC1
bool "High-resolution timer" bool "High-resolution timer"
config ESP32S2_TIME_SYSCALL_USE_NONE config ESP32S2_TIME_SYSCALL_USE_NONE

View File

@@ -430,8 +430,10 @@ menu "ESP32S3-Specific"
config ESP32S3_TIME_SYSCALL_USE_RTC_FRC1 config ESP32S3_TIME_SYSCALL_USE_RTC_FRC1
bool "RTC and high-resolution timer" bool "RTC and high-resolution timer"
select ESP_TIMER_RTC_USE
config ESP32S3_TIME_SYSCALL_USE_RTC config ESP32S3_TIME_SYSCALL_USE_RTC
bool "RTC" bool "RTC"
select ESP_TIMER_RTC_USE
config ESP32S3_TIME_SYSCALL_USE_FRC1 config ESP32S3_TIME_SYSCALL_USE_FRC1
bool "High-resolution timer" bool "High-resolution timer"
config ESP32S3_TIME_SYSCALL_USE_NONE config ESP32S3_TIME_SYSCALL_USE_NONE

View File

@@ -20,11 +20,10 @@ menu "Power Management"
If disabled, DFS will not be active until the application If disabled, DFS will not be active until the application
configures it using esp_pm_configure function. configures it using esp_pm_configure function.
config PM_USE_RTC_TIMER_REF config PM_USE_RTC_TIMER_REF
bool "Use RTC timer to prevent time drift (EXPERIMENTAL)" bool "Use RTC timer to prevent time drift (EXPERIMENTAL)"
depends on PM_ENABLE && ESP_TIMER_IMPL_FRC2 && \ depends on (PM_ENABLE && ESP_TIMER_IMPL_FRC2 && ESP_TIMER_RTC_USE)
(ESP32_TIME_SYSCALL_USE_RTC || ESP32_TIME_SYSCALL_USE_RTC_FRC1 || \
ESP32S2_TIME_SYSCALL_USE_RTC || ESP32S2_TIME_SYSCALL_USE_RTC_FRC1)
default n default n
help help
When APB clock frequency changes, high-resolution timer (esp_timer) When APB clock frequency changes, high-resolution timer (esp_timer)

View File

@@ -5,6 +5,7 @@
#include <sys/param.h> #include <sys/param.h>
#include "unity.h" #include "unity.h"
#include "esp_pm.h" #include "esp_pm.h"
#include "esp_sleep.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "freertos/semphr.h" #include "freertos/semphr.h"
@@ -143,6 +144,7 @@ TEST_CASE("Automatic light occurs when tasks are suspended", "[pm]")
light_sleep_disable(); light_sleep_disable();
} }
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3)
TEST_CASE("Can wake up from automatic light sleep by GPIO", "[pm]") TEST_CASE("Can wake up from automatic light sleep by GPIO", "[pm]")
{ {
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
@@ -213,8 +215,7 @@ TEST_CASE("Can wake up from automatic light sleep by GPIO", "[pm]")
light_sleep_disable(); light_sleep_disable();
} }
#endif
typedef struct { typedef struct {
int delay_us; int delay_us;
int result; int result;

View File

@@ -9,6 +9,9 @@ menu "High resolution timer (esp_timer)"
This option has some effect on timer performance and the amount of memory used for timer This option has some effect on timer performance and the amount of memory used for timer
storage, and should only be used for debugging/testing purposes. storage, and should only be used for debugging/testing purposes.
config ESP_TIMER_RTC_USE # [refactor-todo] remove when timekeeping and persistence are separate
bool
config ESP_TIMER_TASK_STACK_SIZE config ESP_TIMER_TASK_STACK_SIZE
int "High-resolution timer task stack size" int "High-resolution timer task stack size"
default 3584 default 3584

View File

@@ -1,3 +1,3 @@
# This config is split between targets since different component needs to be excluded (esp32, esp32s2) # This config is split between targets since different component needs to be excluded (esp32, esp32s2)
CONFIG_IDF_TARGET="esp32" CONFIG_IDF_TARGET="esp32"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32 esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs test_utils experimental_cpp_component TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32 esp_ipc esp_pm esp_system esp_timer driver heap pthread soc spi_flash vfs test_utils experimental_cpp_component

View File

@@ -1,3 +1,3 @@
# This config is split between targets since different component needs to be excluded (esp32, esp32s2) # This config is split between targets since different component needs to be excluded (esp32, esp32s2)
CONFIG_IDF_TARGET="esp32s2" CONFIG_IDF_TARGET="esp32s2"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32s2 esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs experimental_cpp_component TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32s2 esp_ipc esp_pm esp_system esp_timer driver heap pthread soc spi_flash vfs experimental_cpp_component

View File

@@ -0,0 +1,4 @@
CONFIG_IDF_TARGET="esp32"
TEST_COMPONENTS=esp_pm
CONFIG_PM_ENABLE=y
CONFIG_FREERTOS_USE_TICKLESS_IDLE=y

View File

@@ -0,0 +1,4 @@
CONFIG_IDF_TARGET="esp32s2"
TEST_COMPONENTS=esp_pm
CONFIG_PM_ENABLE=y
CONFIG_FREERTOS_USE_TICKLESS_IDLE=y

View File

@@ -1,5 +1,5 @@
CONFIG_IDF_TARGET="esp32" CONFIG_IDF_TARGET="esp32"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update driver esp32 esp_ipc esp_system esp_timer mbedtls spi_flash test_utils heap pthread soc experimental_cpp_component TEST_EXCLUDE_COMPONENTS=libsodium bt app_update driver esp32 esp_ipc esp_pm esp_system esp_timer mbedtls spi_flash test_utils heap pthread soc experimental_cpp_component
CONFIG_ESP32_SPIRAM_SUPPORT=y CONFIG_ESP32_SPIRAM_SUPPORT=y
CONFIG_ESP_INT_WDT_TIMEOUT_MS=800 CONFIG_ESP_INT_WDT_TIMEOUT_MS=800
CONFIG_SPIRAM_OCCUPY_NO_HOST=y CONFIG_SPIRAM_OCCUPY_NO_HOST=y

View File

@@ -1,6 +1,6 @@
# This config is split between targets since different component needs to be included (esp32, esp32s2) # This config is split between targets since different component needs to be included (esp32, esp32s2)
CONFIG_IDF_TARGET="esp32" CONFIG_IDF_TARGET="esp32"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32 esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs test_utils experimental_cpp_component TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32 esp_ipc esp_pm esp_system esp_timer driver heap pthread soc spi_flash vfs test_utils experimental_cpp_component
CONFIG_COMPILER_OPTIMIZATION_SIZE=y CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y

View File

@@ -1,6 +1,6 @@
# This config is split between targets since different component needs to be excluded (esp32, esp32s2) # This config is split between targets since different component needs to be excluded (esp32, esp32s2)
CONFIG_IDF_TARGET="esp32s2" CONFIG_IDF_TARGET="esp32s2"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32s2 esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs test_utils experimental_cpp_component TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32s2 esp_ipc esp_pm esp_system esp_timer driver heap pthread soc spi_flash vfs test_utils experimental_cpp_component
CONFIG_COMPILER_OPTIMIZATION_SIZE=y CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y

View File

@@ -1,6 +1,6 @@
# This config is split between targets since different component needs to be excluded (esp32, esp32s2) # This config is split between targets since different component needs to be excluded (esp32, esp32s2)
CONFIG_IDF_TARGET="esp32" CONFIG_IDF_TARGET="esp32"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32 esp_system esp_ipc esp_timer driver heap pthread soc spi_flash vfs test_utils experimental_cpp_component TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32 esp_system esp_pm esp_ipc esp_timer driver heap pthread soc spi_flash vfs test_utils experimental_cpp_component
CONFIG_MEMMAP_SMP=n CONFIG_MEMMAP_SMP=n
CONFIG_FREERTOS_UNICORE=y CONFIG_FREERTOS_UNICORE=y
CONFIG_ESP32_RTCDATA_IN_FAST_MEM=y CONFIG_ESP32_RTCDATA_IN_FAST_MEM=y

View File

@@ -1,6 +1,6 @@
# This config is split between targets since different component needs to be excluded (esp32, esp32s2) # This config is split between targets since different component needs to be excluded (esp32, esp32s2)
CONFIG_IDF_TARGET="esp32s2" CONFIG_IDF_TARGET="esp32s2"
TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32s2 esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs experimental_cpp_component TEST_EXCLUDE_COMPONENTS=libsodium bt app_update freertos esp32s2 esp_ipc esp_system esp_pm esp_timer driver heap pthread soc spi_flash vfs experimental_cpp_component
CONFIG_MEMMAP_SMP=n CONFIG_MEMMAP_SMP=n
CONFIG_FREERTOS_UNICORE=y CONFIG_FREERTOS_UNICORE=y
CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y