From 2eae44064673f631f5cc948e65f8cd05941efc4b Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 9 Nov 2017 17:26:43 +0800 Subject: [PATCH] unit-test-app: reduce startup delay, clean up --- tools/unit-test-app/components/unity/include/unity_config.h | 2 +- tools/unit-test-app/main/app_main.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/unit-test-app/components/unity/include/unity_config.h b/tools/unit-test-app/components/unity/include/unity_config.h index 90be3a90fd..2929eb6e39 100644 --- a/tools/unit-test-app/components/unity/include/unity_config.h +++ b/tools/unit-test-app/components/unity/include/unity_config.h @@ -39,7 +39,7 @@ struct test_desc_t void unity_testcase_register(struct test_desc_t* desc); -void unity_run_menu(); +void unity_run_menu() __attribute__((noreturn)); void unity_run_tests_with_filter(const char* filter); diff --git a/tools/unit-test-app/main/app_main.c b/tools/unit-test-app/main/app_main.c index bf54b03957..b3d249fc50 100644 --- a/tools/unit-test-app/main/app_main.c +++ b/tools/unit-test-app/main/app_main.c @@ -6,9 +6,8 @@ void unityTask(void *pvParameters) { - vTaskDelay(1000 / portTICK_PERIOD_MS); - unity_run_menu(); - while(1); + vTaskDelay(30); /* Delay a bit to let the main task be deleted */ + unity_run_menu(); /* Doesn't return */ } void app_main()