diff --git a/examples/system/ota/native_ota_example/example_test.py b/examples/system/ota/native_ota_example/example_test.py index 6269748845..11b0a2ad0a 100644 --- a/examples/system/ota/native_ota_example/example_test.py +++ b/examples/system/ota/native_ota_example/example_test.py @@ -134,7 +134,7 @@ def start_chunked_server(ota_image_dir, server_port): return chunked_server -@ttfw_idf.idf_example_test(env_tag='Example_WIFI_OTA') +@ttfw_idf.idf_example_test(env_tag='EXAMPLE_ETH_OTA') def test_examples_protocol_native_ota_example(env, extra_data): """ This is a positive test case, which downloads complete binary file multiple number of times. @@ -164,7 +164,7 @@ def test_examples_protocol_native_ota_example(env, extra_data): for i in range(iterations): dut1.expect('Loaded app from partition at offset', timeout=30) try: - ip_address = dut1.expect(re.compile(r' sta ip: ([^,]+),'), timeout=30) + ip_address = dut1.expect(re.compile(r' (sta|eth) ip: ([^,]+),'), timeout=30) print('Connected to AP with IP: {}'.format(ip_address)) except DUT.ExpectTimeout: raise ValueError('ENV_TEST_FAILURE: Cannot connect to AP') @@ -178,7 +178,7 @@ def test_examples_protocol_native_ota_example(env, extra_data): dut1.reset() -@ttfw_idf.idf_example_test(env_tag='Example_WIFI_OTA') +@ttfw_idf.idf_example_test(env_tag='EXAMPLE_ETH_OTA') def test_examples_protocol_native_ota_example_truncated_bin(env, extra_data): """ Working of OTA if binary file is truncated is validated in this test case. @@ -217,7 +217,7 @@ def test_examples_protocol_native_ota_example_truncated_bin(env, extra_data): dut1.start_app() dut1.expect('Loaded app from partition at offset', timeout=30) try: - ip_address = dut1.expect(re.compile(r' sta ip: ([^,]+),'), timeout=60) + ip_address = dut1.expect(re.compile(r' (sta|eth) ip: ([^,]+),'), timeout=60) print('Connected to AP with IP: {}'.format(ip_address)) except DUT.ExpectTimeout: raise ValueError('ENV_TEST_FAILURE: Cannot connect to AP') @@ -229,7 +229,7 @@ def test_examples_protocol_native_ota_example_truncated_bin(env, extra_data): os.remove(binary_file) -@ttfw_idf.idf_example_test(env_tag='Example_WIFI_OTA') +@ttfw_idf.idf_example_test(env_tag='EXAMPLE_ETH_OTA') def test_examples_protocol_native_ota_example_truncated_header(env, extra_data): """ Working of OTA if headers of binary file are truncated is vaildated in this test case. @@ -267,7 +267,7 @@ def test_examples_protocol_native_ota_example_truncated_header(env, extra_data): dut1.start_app() dut1.expect('Loaded app from partition at offset', timeout=30) try: - ip_address = dut1.expect(re.compile(r' sta ip: ([^,]+),'), timeout=60) + ip_address = dut1.expect(re.compile(r' (sta|eth) ip: ([^,]+),'), timeout=60) print('Connected to AP with IP: {}'.format(ip_address)) except DUT.ExpectTimeout: raise ValueError('ENV_TEST_FAILURE: Cannot connect to AP') @@ -279,7 +279,7 @@ def test_examples_protocol_native_ota_example_truncated_header(env, extra_data): os.remove(binary_file) -@ttfw_idf.idf_example_test(env_tag='Example_WIFI_OTA') +@ttfw_idf.idf_example_test(env_tag='EXAMPLE_ETH_OTA') def test_examples_protocol_native_ota_example_random(env, extra_data): """ Working of OTA if random data is added in binary file are validated in this test case. @@ -316,7 +316,7 @@ def test_examples_protocol_native_ota_example_random(env, extra_data): dut1.start_app() dut1.expect('Loaded app from partition at offset', timeout=30) try: - ip_address = dut1.expect(re.compile(r' sta ip: ([^,]+),'), timeout=60) + ip_address = dut1.expect(re.compile(r' (sta|eth) ip: ([^,]+),'), timeout=60) print('Connected to AP with IP: {}'.format(ip_address)) except DUT.ExpectTimeout: raise ValueError('ENV_TEST_FAILURE: Cannot connect to AP') @@ -328,7 +328,7 @@ def test_examples_protocol_native_ota_example_random(env, extra_data): os.remove(binary_file) -@ttfw_idf.idf_example_test(env_tag='Example_WIFI_OTA') +@ttfw_idf.idf_example_test(env_tag='EXAMPLE_ETH_OTA') def test_examples_protocol_native_ota_example_chunked(env, extra_data): """ This is a positive test case, which downloads complete binary file multiple number of times. @@ -351,7 +351,7 @@ def test_examples_protocol_native_ota_example_chunked(env, extra_data): dut1.start_app() dut1.expect('Loaded app from partition at offset', timeout=30) try: - ip_address = dut1.expect(re.compile(r' sta ip: ([^,]+),'), timeout=30) + ip_address = dut1.expect(re.compile(r' (sta|eth) ip: ([^,]+),'), timeout=30) print('Connected to AP with IP: {}'.format(ip_address)) except DUT.ExpectTimeout: raise ValueError('ENV_TEST_FAILURE: Cannot connect to AP') diff --git a/examples/system/ota/native_ota_example/sdkconfig.ci b/examples/system/ota/native_ota_example/sdkconfig.ci index 1908291986..3b3472741d 100644 --- a/examples/system/ota/native_ota_example/sdkconfig.ci +++ b/examples/system/ota/native_ota_example/sdkconfig.ci @@ -2,3 +2,13 @@ CONFIG_EXAMPLE_FIRMWARE_UPG_URL="FROM_STDIN" CONFIG_EXAMPLE_SKIP_COMMON_NAME_CHECK=y CONFIG_EXAMPLE_SKIP_VERSION_CHECK=y CONFIG_EXAMPLE_OTA_RECV_TIMEOUT=3000 + +CONFIG_EXAMPLE_CONNECT_ETHERNET=y +CONFIG_EXAMPLE_CONNECT_WIFI=n +CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y +CONFIG_EXAMPLE_ETH_PHY_IP101=y +CONFIG_EXAMPLE_ETH_MDC_GPIO=23 +CONFIG_EXAMPLE_ETH_MDIO_GPIO=18 +CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5 +CONFIG_EXAMPLE_ETH_PHY_ADDR=1 +CONFIG_EXAMPLE_CONNECT_IPV6=y