app_main.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Unlicense OR CC0-1.0
  5. */
  6. #include "freertos/FreeRTOS.h"
  7. #include "freertos/task.h"
  8. #include "unity.h"
  9. #include "unity_fixture.h"
  10. #include "unity_fixture_extras.h"
  11. static void run_all_tests(void)
  12. {
  13. #if CONFIG_SOC_MPI_SUPPORTED
  14. RUN_TEST_GROUP(mpi);
  15. #endif
  16. #if CONFIG_SOC_ECC_SUPPORTED
  17. RUN_TEST_GROUP(ecc);
  18. #endif
  19. #if CONFIG_SOC_AES_SUPPORTED
  20. RUN_TEST_GROUP(aes);
  21. #endif
  22. #if CONFIG_SOC_SHA_SUPPORTED
  23. #if !CONFIG_SOC_SHA_SUPPORT_PARALLEL_ENG
  24. RUN_TEST_GROUP(sha);
  25. #endif /* !CONFIG_SOC_SHA_SUPPORT_PARALLEL_ENG*/
  26. #endif
  27. #if CONFIG_IDF_ENV_FPGA
  28. #if CONFIG_SOC_HMAC_SUPPORTED
  29. RUN_TEST_GROUP(hmac);
  30. #endif
  31. #if CONFIG_SOC_DIG_SIGN_SUPPORTED
  32. RUN_TEST_GROUP(ds);
  33. #endif
  34. #if CONFIG_SOC_ECDSA_SUPPORTED
  35. RUN_TEST_GROUP(ecdsa)
  36. #endif
  37. #endif /* CONFIG_IDF_ENV_FPGA */
  38. }
  39. static void test_task(void *pvParameters)
  40. {
  41. vTaskDelay(2); /* Delay a bit to let the main task be deleted */
  42. UNITY_MAIN_FUNC(run_all_tests);
  43. vTaskDelete(NULL);
  44. }
  45. void app_main(void)
  46. {
  47. xTaskCreatePinnedToCore(test_task, "testTask", CONFIG_UNITY_FREERTOS_STACK_SIZE, NULL, CONFIG_UNITY_FREERTOS_PRIORITY, NULL, CONFIG_UNITY_FREERTOS_CPU);
  48. }