2023-05-11 02:50:27 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
|
|
|
*/
|
|
|
|
|
2023-05-26 08:45:48 -04:00
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
|
|
|
#include "unity.h"
|
2023-05-11 02:50:27 -04:00
|
|
|
#include "unity_fixture.h"
|
|
|
|
#include "unity_fixture_extras.h"
|
|
|
|
|
|
|
|
static void run_all_tests(void)
|
|
|
|
{
|
2023-05-11 05:58:02 -04:00
|
|
|
#if CONFIG_SOC_MPI_SUPPORTED
|
2023-05-11 02:50:27 -04:00
|
|
|
RUN_TEST_GROUP(mpi);
|
2023-05-11 05:58:02 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if CONFIG_SOC_ECC_SUPPORTED
|
|
|
|
RUN_TEST_GROUP(ecc);
|
|
|
|
#endif
|
2023-05-11 07:01:00 -04:00
|
|
|
|
|
|
|
#if CONFIG_IDF_ENV_FPGA
|
|
|
|
|
|
|
|
#if CONFIG_SOC_HMAC_SUPPORTED
|
|
|
|
RUN_TEST_GROUP(hmac);
|
|
|
|
#endif
|
|
|
|
|
2023-05-11 08:34:48 -04:00
|
|
|
#if CONFIG_SOC_DIG_SIGN_SUPPORTED
|
|
|
|
RUN_TEST_GROUP(ds);
|
2023-05-11 07:01:00 -04:00
|
|
|
#endif
|
2023-05-11 08:34:48 -04:00
|
|
|
|
2023-05-15 02:50:03 -04:00
|
|
|
#if CONFIG_SOC_ECDSA_SUPPORTED
|
|
|
|
RUN_TEST_GROUP(ecdsa)
|
|
|
|
#endif
|
|
|
|
|
2023-05-11 08:34:48 -04:00
|
|
|
#endif /* CONFIG_IDF_ENV_FPGA */
|
2023-05-11 02:50:27 -04:00
|
|
|
}
|
|
|
|
|
2023-05-26 08:45:48 -04:00
|
|
|
static void test_task(void *pvParameters)
|
2023-05-11 02:50:27 -04:00
|
|
|
{
|
2023-05-26 08:45:48 -04:00
|
|
|
vTaskDelay(2); /* Delay a bit to let the main task be deleted */
|
2023-05-11 02:50:27 -04:00
|
|
|
UNITY_MAIN_FUNC(run_all_tests);
|
2023-05-26 08:45:48 -04:00
|
|
|
vTaskDelete(NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
void app_main(void)
|
|
|
|
{
|
|
|
|
xTaskCreatePinnedToCore(test_task, "testTask", CONFIG_UNITY_FREERTOS_STACK_SIZE, NULL, CONFIG_UNITY_FREERTOS_PRIORITY, NULL, CONFIG_UNITY_FREERTOS_CPU);
|
2023-05-11 02:50:27 -04:00
|
|
|
}
|