]> granicus.if.org Git - esp-idf/commitdiff
unit-test-app: reduce startup delay, clean up
authorIvan Grokhotkov <ivan@espressif.com>
Thu, 9 Nov 2017 09:26:43 +0000 (17:26 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 20 Nov 2017 09:51:27 +0000 (17:51 +0800)
tools/unit-test-app/components/unity/include/unity_config.h
tools/unit-test-app/main/app_main.c

index 90be3a90fd42fb7edc25bce0a3e9a3bb211d966c..2929eb6e397e5ed38b96c61d02a24dea69ec6acb 100644 (file)
@@ -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);
 
index bf54b03957b2a01941ae524aaafe5e3caa6863e1..b3d249fc5008ed436782418f0bbbe6b36c3239a5 100644 (file)
@@ -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()