Skip to content

Commit

Permalink
Merge branch 'feat/enable_and_fix_app_update_test_app' into 'master'
Browse files Browse the repository at this point in the history
feat: Enable test app for app_update component

Closes IDF-9803 and IDF-9804

See merge request espressif/esp-idf!30496
  • Loading branch information
mahavirj committed May 6, 2024
2 parents 0de1efc + 3048ca3 commit f311c23
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 11 deletions.
4 changes: 2 additions & 2 deletions components/app_update/test_apps/.build-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

components/app_update/test_apps:
disable:
- if: IDF_TARGET in ["esp32c6", "esp32h2", "esp32c5"]
- if: IDF_TARGET in ["esp32c5"]
temporary: true
reason: target esp32c6, esp32h2 esp32c5 is not supported yet # TODO: [ESP32C5] IDF-8638
reason: target esp32c5 is not supported yet # TODO: [ESP32C5] IDF-8638
4 changes: 2 additions & 2 deletions components/app_update/test_apps/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
3 changes: 1 addition & 2 deletions components/app_update/test_apps/main/test_switch_ota.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,7 @@ static void test_flow6(void)
// 3 Stage: run OTA0 -> check it -> erase OTA_DATA for next tests -> PASS
TEST_CASE_MULTIPLE_STAGES("Switching between factory, OTA0 using esp_ota_write_with_offset", "[app_update][timeout=90][reset=DEEPSLEEP_RESET, DEEPSLEEP_RESET]", start_test, test_flow6, test_flow6);

//IDF-5145
TEST_CASE("Test bootloader_common_get_sha256_of_partition returns ESP_ERR_IMAGE_INVALID when image is ivalid", "[partitions]")
TEST_CASE("Test bootloader_common_get_sha256_of_partition returns ESP_ERR_IMAGE_INVALID when image is invalid", "[partitions]")
{
const esp_partition_t *cur_app = esp_ota_get_running_partition();
ESP_LOGI(TAG, "copy current app to next part");
Expand Down
1 change: 0 additions & 1 deletion components/app_update/test_apps/pytest_app_update_ut.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def run_multiple_stages(dut: Dut, test_case_num: int, stages: int) -> None:


@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')
@pytest.mark.generic
def test_app_update(dut: Dut) -> None:
extra_data = dut.parse_test_menu()
Expand Down
4 changes: 4 additions & 0 deletions components/app_update/test_apps/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ CONFIG_PARTITION_TABLE_FILENAME="partition_table_unit_test_two_ota.csv"

CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_OFFSET=0x18000

CONFIG_BOOTLOADER_FACTORY_RESET=y
CONFIG_BOOTLOADER_APP_TEST=y
CONFIG_BOOTLOADER_DATA_FACTORY_RESET=""
CONFIG_BOOTLOADER_HOLD_TIME_GPIO=2
CONFIG_BOOTLOADER_OTA_DATA_ERASE=y
4 changes: 0 additions & 4 deletions components/app_update/test_apps/sdkconfig.defaults.esp32
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
CONFIG_IDF_TARGET="esp32"
CONFIG_BOOTLOADER_FACTORY_RESET=y
CONFIG_BOOTLOADER_APP_TEST=y
CONFIG_BOOTLOADER_DATA_FACTORY_RESET=""
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=32
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4
CONFIG_BOOTLOADER_HOLD_TIME_GPIO=2
1 change: 1 addition & 0 deletions components/app_update/test_apps/sdkconfig.defaults.esp32c2
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partition_table_unit_test_two_ota_2m.csv"
CONFIG_PARTITION_TABLE_FILENAME="partition_table_unit_test_two_ota_2m.csv"
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4
1 change: 1 addition & 0 deletions components/app_update/test_apps/sdkconfig.defaults.esp32c3
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CONFIG_IDF_TARGET="esp32c3"
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4
3 changes: 3 additions & 0 deletions components/app_update/test_apps/sdkconfig.defaults.esp32c6
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32c6"
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4
3 changes: 3 additions & 0 deletions components/app_update/test_apps/sdkconfig.defaults.esp32h2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32h2"
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=22
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4
3 changes: 3 additions & 0 deletions components/app_update/test_apps/sdkconfig.defaults.esp32p4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32p4"
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=19
1 change: 1 addition & 0 deletions components/app_update/test_apps/sdkconfig.defaults.esp32s2
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CONFIG_IDF_TARGET="esp32s2"
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4
3 changes: 3 additions & 0 deletions components/app_update/test_apps/sdkconfig.defaults.esp32s3
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_IDF_TARGET="esp32s3"
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18
CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET=4

0 comments on commit f311c23

Please sign in to comment.