Skip to content

Commit 175b506

Browse files
committed
Add test to edgehog_device
Add nvs get/set string test cases. Add `edgehog_device_get_telemetry_type` test cases. Add `edgehog_device_get_telemetry_periodic` test cases. Increase WDT_TIMEOUT_MS for fixing 'Interrupt wdt timeout on CPU0' when run test in QEMU. Signed-off-by: Antonio Gisondi <antonio.gisondi@secomind.com>
1 parent 67119b4 commit 175b506

4 files changed

Lines changed: 1289 additions & 3 deletions

File tree

test/app_test/main/test_main.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#include <unity.h>
2+
#include <nvs_flash.h>
3+
#include <nvs.h>
24

35
void app_main(void)
46
{
7+
esp_err_t err = nvs_flash_init();
8+
if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
9+
ESP_ERROR_CHECK(nvs_flash_erase());
10+
err = nvs_flash_init();
11+
}
12+
ESP_ERROR_CHECK( err );
13+
514
UNITY_BEGIN();
615
unity_run_all_tests();
716
UNITY_END();

0 commit comments

Comments
 (0)