mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
Merge branch 'ci/enable_esp_event_tests' into 'master'
ci(core): fixed esp_event and psram freertos not running properly in CI See merge request espressif/esp-idf!44711
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: CC0-1.0
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@@ -29,26 +29,31 @@ void setUp(void)
|
||||
before_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT);
|
||||
before_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT);
|
||||
|
||||
#if SOC_WDT_SUPPORTED
|
||||
esp_task_wdt_add(NULL);
|
||||
esp_task_wdt_reset();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void tearDown(void)
|
||||
{
|
||||
#if SOC_WDT_SUPPORTED
|
||||
esp_task_wdt_reset();
|
||||
esp_task_wdt_delete(NULL);
|
||||
#endif
|
||||
|
||||
// Add a short delay of 10ms to allow the idle task to free an remaining memory
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT);
|
||||
size_t after_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT);
|
||||
check_leak(before_free_8bit, after_free_8bit, "8BIT");
|
||||
check_leak(before_free_32bit, after_free_32bit, "32BIT");
|
||||
|
||||
esp_task_wdt_reset();
|
||||
esp_task_wdt_delete(NULL);
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
#if SOC_WDT_SUPPORTED
|
||||
// Configure the task watchdog timer to catch any tests that hang
|
||||
esp_task_wdt_config_t config = {
|
||||
.timeout_ms = 25 * 1000, // 25 seconds, smaller than the default pytest timeout
|
||||
@@ -57,6 +62,7 @@ void app_main(void)
|
||||
};
|
||||
|
||||
esp_task_wdt_init(&config);
|
||||
#endif // SOC_WDT_SUPPORTED
|
||||
|
||||
// Raise priority to main task as some tests depend on the test task being at priority UNITY_FREERTOS_PRIORITY
|
||||
vTaskPrioritySet(NULL, UNITY_FREERTOS_PRIORITY);
|
||||
|
||||
Reference in New Issue
Block a user