unit tests: Only initialise tcpip_adapter() when needed by the test

Prevents unexpected memory allocations when running tests which
don't require tcpip_adapter.
This commit is contained in:
Angus Gratton
2018-09-26 10:17:46 +10:00
committed by bot
parent 222a7118a9
commit 159ff6e08e
8 changed files with 103 additions and 18 deletions
@@ -9,6 +9,7 @@
#include "esp_wifi_types.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "test_utils.h"
static const char* TAG = "test_wifi";
@@ -79,7 +80,9 @@ static void test_wifi_start_stop(wifi_init_config_t *cfg, wifi_config_t* wifi_co
}
TEST_CASE("wifi stop and deinit","[wifi]")
{
{
test_case_uses_tcpip();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
wifi_config_t wifi_config = {
.sta = {