unit test: move unit-test_app test_utils_task_delete API to be a utils API (unity_utils_task_delete) in unity component

This commit is contained in:
songruojing
2022-03-14 19:00:59 +08:00
committed by songruo
parent 204432191d
commit bdb5b11b39
11 changed files with 110 additions and 76 deletions

View File

@@ -7,6 +7,7 @@
#include "nvs_flash.h"
#include "test_utils.h"
#include "freertos/event_groups.h"
#include "unity_test_utils.h"
#define GOT_IP_EVENT 0x00000001
#define DISCONNECT_EVENT 0x00000002
@@ -116,7 +117,7 @@ TEST_CASE("wifi driver can start on APP CPU", "[wifi_init]")
xSemaphoreTake(sema, portMAX_DELAY);
vSemaphoreDelete(sema);
sema = NULL;
test_utils_task_delete(th);
unity_utils_task_delete(th);
}
static void wifi_start_stop_task(void* arg)
@@ -169,7 +170,7 @@ TEST_CASE("Calling esp_wifi_stop() with start", "[wifi_init]")
xSemaphoreTake(sema, portMAX_DELAY);
vSemaphoreDelete(sema);
sema = NULL;
test_utils_task_delete(th);
unity_utils_task_delete(th);
}
static void wifi_stop_task(void* arg)
@@ -218,7 +219,7 @@ TEST_CASE("Calling esp_wifi_stop() without start", "[wifi_init]")
xSemaphoreTake(sema, portMAX_DELAY);
vSemaphoreDelete(sema);
sema = NULL;
test_utils_task_delete(th);
unity_utils_task_delete(th);
}
static void wifi_deinit_task(void* arg)
@@ -271,5 +272,5 @@ TEST_CASE("Calling esp_wifi_deinit() without stop", "[wifi_init]")
xSemaphoreTake(sema, portMAX_DELAY);
vSemaphoreDelete(sema);
sema = NULL;
test_utils_task_delete(th);
unity_utils_task_delete(th);
}