mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
unit tests: Only initialise tcpip_adapter() when needed by the test
Prevents unexpected memory allocations when running tests which don't require tcpip_adapter.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include "freertos/task.h"
|
||||
#include "unity.h"
|
||||
#include "unity_config.h"
|
||||
#include "tcpip_adapter.h"
|
||||
|
||||
void unityTask(void *pvParameters)
|
||||
{
|
||||
@@ -13,10 +12,6 @@ void unityTask(void *pvParameters)
|
||||
|
||||
void app_main()
|
||||
{
|
||||
// TCP/IP adapter is initialized here because it leaks memory so the
|
||||
// initialization in test cases would make the test fail because of leak.
|
||||
tcpip_adapter_init();
|
||||
|
||||
// Note: if unpinning this task, change the way run times are calculated in
|
||||
// unity_platform
|
||||
xTaskCreatePinnedToCore(unityTask, "unityTask", UNITY_FREERTOS_STACK_SIZE, NULL,
|
||||
|
Reference in New Issue
Block a user