OVMS3-idf/tools/unit-test-app/main/app_main.c
Angus Gratton 159ff6e08e unit tests: Only initialise tcpip_adapter() when needed by the test
Prevents unexpected memory allocations when running tests which
don't require tcpip_adapter.
2018-10-17 22:53:46 +00:00

20 lines
562 B
C

#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "unity.h"
#include "unity_config.h"
void unityTask(void *pvParameters)
{
vTaskDelay(2); /* Delay a bit to let the main task be deleted */
unity_run_menu(); /* Doesn't return */
}
void app_main()
{
// Note: if unpinning this task, change the way run times are calculated in
// unity_platform
xTaskCreatePinnedToCore(unityTask, "unityTask", UNITY_FREERTOS_STACK_SIZE, NULL,
UNITY_FREERTOS_PRIORITY, NULL, UNITY_FREERTOS_CPU);
}