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
+4 -1
View File
@@ -10,6 +10,7 @@
#include "esp_wifi.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "test_utils.h"
static const char* TAG = "test_adc2";
@@ -44,7 +45,9 @@ TEST_CASE("adc2 work with wifi","[adc]")
{
int read_raw;
int target_value;
test_case_uses_tcpip();
//adc and dac init
TEST_ESP_OK( dac_output_enable( DAC_CHANNEL_1 ));
TEST_ESP_OK( dac_output_enable( DAC_CHANNEL_2 ));