mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
revert(unit-test): filter top domain power down check for some sleep test cases
This reverts commit c6c2948a99.
This commit is contained in:
@@ -85,7 +85,7 @@ static void test_gptimer_sleep_retention(bool allow_pd)
|
|||||||
|
|
||||||
printf("check if the sleep happened as expected\r\n");
|
printf("check if the sleep happened as expected\r\n");
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_TIMER_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_TIMER_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
@@ -202,7 +202,7 @@ static void test_gptimer_etm_sleep_retention(bool back_up_before_sleep)
|
|||||||
|
|
||||||
printf("check if the sleep happened as expected\r\n");
|
printf("check if the sleep happened as expected\r\n");
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_TIMER_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_TIMER_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(back_up_before_sleep ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(back_up_before_sleep ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ static void s_test_i2s_enter_light_sleep(int sec, bool allow_power_down)
|
|||||||
printf("Woke up from light sleep\n");
|
printf("Woke up from light sleep\n");
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_HAS(PAU) && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_HAS(PAU)
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(allow_power_down ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(allow_power_down ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ static void test_ledc_sleep_retention(bool allow_pd)
|
|||||||
|
|
||||||
printf("Check if the sleep happened as expected\r\n");
|
printf("Check if the sleep happened as expected\r\n");
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_PMU_SUPPORTED && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_PMU_SUPPORTED
|
||||||
// check if the TOP power domain on/off as desired
|
// check if the TOP power domain on/off as desired
|
||||||
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ static void test_mcpwm_timer_sleep_retention(bool allow_pd)
|
|||||||
|
|
||||||
printf("check if the sleep happened as expected\r\n");
|
printf("check if the sleep happened as expected\r\n");
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_MCPWM_SUPPORT_SLEEP_RETENTION && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_MCPWM_SUPPORT_SLEEP_RETENTION
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
@@ -189,7 +189,7 @@ static void test_mcpwm_capture_timer_sleep_retention(bool allow_pd)
|
|||||||
|
|
||||||
printf("check if the sleep happened as expected\r\n");
|
printf("check if the sleep happened as expected\r\n");
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_MCPWM_SUPPORT_SLEEP_RETENTION && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_MCPWM_SUPPORT_SLEEP_RETENTION
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ static void test_parlio_sleep_retention(bool allow_pd)
|
|||||||
|
|
||||||
printf("check if the sleep happened as expected\r\n");
|
printf("check if the sleep happened as expected\r\n");
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_PARLIO_SUPPORT_SLEEP_RETENTION && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_PARLIO_SUPPORT_SLEEP_RETENTION
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ static void test_rmt_tx_rx_sleep_retention(bool allow_pd)
|
|||||||
|
|
||||||
printf("check if the sleep happened as expected\r\n");
|
printf("check if the sleep happened as expected\r\n");
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_RMT_SUPPORT_SLEEP_RETENTION && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_RMT_SUPPORT_SLEEP_RETENTION
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1885,7 +1885,7 @@ TEST_CASE("test_spi_master_sleep_retention", "[spi]")
|
|||||||
|
|
||||||
// check if the sleep happened as expected
|
// check if the sleep happened as expected
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL((buscfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL((buscfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
@@ -1952,7 +1952,7 @@ TEST_CASE("test_spi_master_auto_sleep_retention", "[spi]")
|
|||||||
|
|
||||||
// check if the sleep happened as expected
|
// check if the sleep happened as expected
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL((buscfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL((buscfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ TEST_CASE("test_spi_slave_sleep_retention", "[spi]")
|
|||||||
|
|
||||||
// check if the sleep happened as expected
|
// check if the sleep happened as expected
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL((buscfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL((buscfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -966,7 +966,7 @@ TEST_CASE("test_spi_slave_hd_sleep_retention", "[spi]")
|
|||||||
printf("Waked up!\n");
|
printf("Waked up!\n");
|
||||||
// check if the sleep happened as expected
|
// check if the sleep happened as expected
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL((bus_cfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL((bus_cfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
@@ -1044,7 +1044,7 @@ TEST_CASE("test_spi_slave_hd_append_sleep_retention", "[spi]")
|
|||||||
printf("Waked up!\n");
|
printf("Waked up!\n");
|
||||||
// check if the sleep happened as expected
|
// check if the sleep happened as expected
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_SPI_SUPPORT_SLEEP_RETENTION && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL((bus_cfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL((bus_cfg.flags & SPICOMMON_BUSFLAG_SLP_ALLOW_PD) ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -186,7 +186,7 @@ static void test_temperature_sensor_sleep_retention(bool allow_pd)
|
|||||||
#endif
|
#endif
|
||||||
printf("check if the sleep happened as expected\r\n");
|
printf("check if the sleep happened as expected\r\n");
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
#if SOC_TEMPERATURE_SENSOR_UNDER_PD_TOP_DOMAIN && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if SOC_TEMPERATURE_SENSOR_UNDER_PD_TOP_DOMAIN
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(allow_pd ? PMU_SLEEP_PD_TOP : 0, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#elif CONFIG_IDF_TARGET_ESP32P4
|
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ TEST_CASE("verify esp_random() bit balance 0/1 ratio", "[random]")
|
|||||||
#endif
|
#endif
|
||||||
TEST_ESP_OK(esp_sleep_enable_timer_wakeup(1 * 1000 * 1000));
|
TEST_ESP_OK(esp_sleep_enable_timer_wakeup(1 * 1000 * 1000));
|
||||||
TEST_ESP_OK(esp_light_sleep_start());
|
TEST_ESP_OK(esp_light_sleep_start());
|
||||||
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
// check if the power domain also is powered down
|
// check if the power domain also is powered down
|
||||||
TEST_ASSERT_EQUAL(PMU_SLEEP_PD_TOP, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(PMU_SLEEP_PD_TOP, (sleep_ctx.sleep_flags) & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ static void test_psram_accessible_after_lightsleep(void)
|
|||||||
esp_light_sleep_start();
|
esp_light_sleep_start();
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
|
|
||||||
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && !SOC_PM_TOP_PD_NOT_ALLOWED
|
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||||
TEST_ASSERT_EQUAL(PMU_SLEEP_PD_TOP, sleep_ctx.sleep_flags & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(PMU_SLEEP_PD_TOP, sleep_ctx.sleep_flags & PMU_SLEEP_PD_TOP);
|
||||||
TEST_ESP_OK(sleep_cpu_configure(false));
|
TEST_ESP_OK(sleep_cpu_configure(false));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -74,9 +74,7 @@ TEST_CASE("Task WDT task timeout after peripheral powerdown lightsleep", "[task_
|
|||||||
|
|
||||||
esp_light_sleep_start();
|
esp_light_sleep_start();
|
||||||
|
|
||||||
#if !SOC_PM_TOP_PD_NOT_ALLOWED
|
|
||||||
TEST_ASSERT_EQUAL(PMU_SLEEP_PD_TOP, sleep_ctx.sleep_flags & PMU_SLEEP_PD_TOP);
|
TEST_ASSERT_EQUAL(PMU_SLEEP_PD_TOP, sleep_ctx.sleep_flags & PMU_SLEEP_PD_TOP);
|
||||||
#endif
|
|
||||||
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
TEST_ASSERT_EQUAL(0, sleep_ctx.sleep_request_result);
|
||||||
esp_sleep_set_sleep_context(NULL);
|
esp_sleep_set_sleep_context(NULL);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user