1 /* Test only application
2 
3    This example code is in the Public Domain (or CC0 licensed, at your option.)
4 
5    Unless required by applicable law or agreed to in writing, this
6    software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
7    CONDITIONS OF ANY KIND, either express or implied.
8 */
9 
10 #include "esp_system.h"
11 #include "esp_log.h"
12 #include "nvs_flash.h"
13 
14 static const char *TAG = "build only test";
15 
16 extern "C" void esp_netif_compile_test_c99();
17 void esp_netif_compile_test_cpp(void);
18 
app_main(void)19 extern "C" void app_main(void)
20 {
21     esp_err_t ret = nvs_flash_init();
22     if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
23       ESP_ERROR_CHECK(nvs_flash_erase());
24       ret = nvs_flash_init();
25     }
26     ESP_ERROR_CHECK(ret);
27 
28     ESP_LOGE(TAG, "This is app is test only! It is not supposed to be executed!");
29     // Calling CPP initialization tests
30     esp_netif_compile_test_cpp();
31     // Calling C initialization tests
32     esp_netif_compile_test_c99();
33 }
34