diff --git a/components/app_update/test/test_switch_ota.c b/components/app_update/test/test_switch_ota.c index ec1847135a..98192b9fe3 100644 --- a/components/app_update/test/test_switch_ota.c +++ b/components/app_update/test/test_switch_ota.c @@ -19,7 +19,6 @@ #include "freertos/task.h" #include "freertos/semphr.h" #include "freertos/queue.h" -#include "freertos/xtensa_api.h" #include "unity.h" #include "bootloader_common.h" @@ -450,7 +449,7 @@ static void test_flow4(void) ESP_LOGI(TAG, "boot count %d", boot_count); const esp_partition_t *cur_app = get_running_firmware(); nvs_handle_t handle = 0; - int boot_count_nvs = 0; + int32_t boot_count_nvs = 0; switch (boot_count) { case 2: ESP_LOGI(TAG, "Factory"); @@ -486,7 +485,7 @@ static void test_flow4(void) ESP_LOGI(TAG, "Factory"); TEST_ASSERT_EQUAL(ESP_PARTITION_SUBTYPE_APP_FACTORY, cur_app->subtype); - int boot_count_nvs; + int32_t boot_count_nvs; TEST_ESP_OK(nvs_flash_init()); TEST_ESP_OK(nvs_open(STORAGE_NAMESPACE, NVS_READWRITE, &handle)); TEST_ESP_ERR(ESP_ERR_NVS_NOT_FOUND, nvs_get_i32(handle, "boot_count", &boot_count_nvs)); diff --git a/tools/unit-test-app/configs/app_update_c3 b/tools/unit-test-app/configs/app_update_c3 new file mode 100644 index 0000000000..072bef2040 --- /dev/null +++ b/tools/unit-test-app/configs/app_update_c3 @@ -0,0 +1,15 @@ +# This config is split between targets since different component needs to be excluded (esp32, esp32s2) +CONFIG_IDF_TARGET="esp32c3" +TEST_COMPONENTS=app_update +TEST_EXCLUDE_COMPONENTS=libsodium bt +CONFIG_UNITY_FREERTOS_STACK_SIZE=12288 +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partition_table_unit_test_two_ota.csv" +CONFIG_PARTITION_TABLE_FILENAME="partition_table_unit_test_two_ota.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x18000 +CONFIG_BOOTLOADER_FACTORY_RESET=y +CONFIG_BOOTLOADER_APP_TEST=y +CONFIG_BOOTLOADER_HOLD_TIME_GPIO=2 +CONFIG_BOOTLOADER_OTA_DATA_ERASE=y +CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4 +CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18