From 90372e96ab992058084e1059d9ed835873046bc0 Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Wed, 22 Mar 2023 16:26:29 +0800 Subject: [PATCH] openthread ci: replace h4 with c6 --- .gitlab/ci/dependencies/dependencies.yml | 1 - .gitlab/ci/target-test.yml | 3 +- examples/openthread/.build-test-rules.yml | 12 +- examples/openthread/ot_cli/README.md | 4 +- examples/openthread/ot_cli/sdkconfig.ci.cli | 3 - .../ot_cli/sdkconfig.ci.disable_cli | 5 +- examples/openthread/ot_rcp/README.md | 4 +- examples/openthread/pytest_otbr.py | 119 +++++++++--------- 8 files changed, 75 insertions(+), 76 deletions(-) delete mode 100644 examples/openthread/ot_cli/sdkconfig.ci.cli diff --git a/.gitlab/ci/dependencies/dependencies.yml b/.gitlab/ci/dependencies/dependencies.yml index b39da7b42c..0ba5e12ec7 100644 --- a/.gitlab/ci/dependencies/dependencies.yml +++ b/.gitlab/ci/dependencies/dependencies.yml @@ -175,7 +175,6 @@ build:integration_test: - target_test - example_test included_in: - - "build:example_test-esp32h4" - "build:example_test-esp32s3" - "build:example_test-esp32c6" - "build:example_test-esp32h2" diff --git a/.gitlab/ci/target-test.yml b/.gitlab/ci/target-test.yml index aa436740be..ff4fbf86dc 100644 --- a/.gitlab/ci/target-test.yml +++ b/.gitlab/ci/target-test.yml @@ -915,10 +915,9 @@ example_test_pytest_openthread_br: needs: - build_pytest_examples_esp32s3 - build_pytest_examples_esp32c6 - - build_pytest_examples_esp32h4 - build_pytest_examples_esp32h2 tags: - - esp32h4 + - esp32c6 - openthread_br component_ut_pytest_esp32s3_usb_host: diff --git a/examples/openthread/.build-test-rules.yml b/examples/openthread/.build-test-rules.yml index c3c0e491af..75acba2f4d 100644 --- a/examples/openthread/.build-test-rules.yml +++ b/examples/openthread/.build-test-rules.yml @@ -12,12 +12,16 @@ examples/openthread/ot_br: examples/openthread/ot_cli: enable: - - if: IDF_TARGET in ["esp32h2", "esp32h4", "esp32c6"] + - if: IDF_TARGET in ["esp32h2", "esp32c6"] + disable_test: + - if: IDF_TARGET == "esp32c6" + temporary: true + reason: only test on esp32h2 examples/openthread/ot_rcp: enable: - - if: IDF_TARGET in ["esp32h2", "esp32h4", "esp32c6"] - disable_test: - if: IDF_TARGET in ["esp32h2", "esp32c6"] + disable_test: + - if: IDF_TARGET == "esp32h2" temporary: true - reason: only test on esp32h4 + reason: only test on esp32c6 diff --git a/examples/openthread/ot_cli/README.md b/examples/openthread/ot_cli/README.md index 97839575b1..1c53acf0da 100644 --- a/examples/openthread/ot_cli/README.md +++ b/examples/openthread/ot_cli/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C6 | ESP32-H2 | ESP32-H4 | -| ----------------- | -------- | -------- | -------- | +| Supported Targets | ESP32-C6 | ESP32-H2 | +| ----------------- | -------- | -------- | # OpenThread Command Line Example diff --git a/examples/openthread/ot_cli/sdkconfig.ci.cli b/examples/openthread/ot_cli/sdkconfig.ci.cli deleted file mode 100644 index 126f1384a7..0000000000 --- a/examples/openthread/ot_cli/sdkconfig.ci.cli +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_IDF_TARGET="esp32h4" -CONFIG_IDF_TARGET_ESP32H4=y -CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2=y diff --git a/examples/openthread/ot_cli/sdkconfig.ci.disable_cli b/examples/openthread/ot_cli/sdkconfig.ci.disable_cli index fcb0e68ac2..51c321da5e 100644 --- a/examples/openthread/ot_cli/sdkconfig.ci.disable_cli +++ b/examples/openthread/ot_cli/sdkconfig.ci.disable_cli @@ -1,5 +1,4 @@ -CONFIG_IDF_TARGET="esp32h4" -CONFIG_IDF_TARGET_ESP32H4=y -CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2=y +CONFIG_IDF_TARGET="esp32h2" +CONFIG_IDF_TARGET_ESP32H2=y CONFIG_OPENTHREAD_CLI=n CONFIG_OPENTHREAD_CLI_ESP_EXTENSION=n diff --git a/examples/openthread/ot_rcp/README.md b/examples/openthread/ot_rcp/README.md index c8ebe57cd7..fff79a198a 100644 --- a/examples/openthread/ot_rcp/README.md +++ b/examples/openthread/ot_rcp/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C6 | ESP32-H2 | ESP32-H4 | -| ----------------- | -------- | -------- | -------- | +| Supported Targets | ESP32-C6 | ESP32-H2 | +| ----------------- | -------- | -------- | # OpenThread Radio Co-Processor (RCP) Example diff --git a/examples/openthread/pytest_otbr.py b/examples/openthread/pytest_otbr.py index 4c54da674f..fcd0efef65 100644 --- a/examples/openthread/pytest_otbr.py +++ b/examples/openthread/pytest_otbr.py @@ -65,38 +65,31 @@ def fixture_Init_interface() -> bool: default_br_ot_para = ocf.thread_parameter('leader', '', '12', '7766554433221100', True) default_br_wifi_para = ocf.wifi_parameter('OTCITE', 'otcitest888', 10) -default_cli_ot_para = ocf.thread_parameter('router', '', '12', '', False) +default_cli_ot_para = ocf.thread_parameter('router', '', '', '', False) # Case 1: Thread network formation and attaching -@pytest.mark.esp32s3 +@pytest.mark.supported_targets @pytest.mark.esp32h2 -@pytest.mark.esp32h4 @pytest.mark.esp32c6 @pytest.mark.openthread_br -@pytest.mark.flaky(reruns=1, reruns_delay=1) +@pytest.mark.flaky(reruns=0, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR|/dev/USB_CLI_C6|/dev/USB_CLI_H2', - 'rcp|cli|br|cli_c6|cli_h2', 5, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' - f'|{os.path.join(os.path.dirname(__file__), "ot_br")}' - f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' - f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}', - 'esp32h2beta2|esp32h2beta2|esp32s3|esp32c6|esp32h2', - 'esp32h4|esp32h4|esp32s3|esp32c6|esp32h2'), + f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, ) -def test_thread_connect(dut:Tuple[IdfDut, IdfDut, IdfDut, IdfDut, IdfDut]) -> None: +def test_thread_connect(dut:Tuple[IdfDut, IdfDut, IdfDut]) -> None: br = dut[2] - cli_h4 = dut[1] - cli_c6 = dut[3] - cli_h2 = dut[4] + cli_h2 = dut[1] dut[0].serial.stop_redirect_thread() - cli_list = [cli_h4, cli_c6, cli_h2] - router_extaddr_list = ['7766554433221101', '7766554433221102', '7766554433221103'] + cli_list = [cli_h2] + router_extaddr_list = ['7766554433221101'] ocf.reset_thread(br) for cli in cli_list: @@ -144,17 +137,18 @@ def formBasicWiFiThreadNetwork(br:IdfDut, cli:IdfDut) -> None: # Case 2: Bidirectional IPv6 connectivity -@pytest.mark.esp32s3 -@pytest.mark.esp32h4 +@pytest.mark.supported_targets +@pytest.mark.esp32h2 +@pytest.mark.esp32c6 @pytest.mark.openthread_br -@pytest.mark.flaky(reruns=1, reruns_delay=1) +@pytest.mark.flaky(reruns=0, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR', 'rcp|cli|br', 3, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', - 'esp32h2beta2|esp32h2beta2|esp32s3', 'esp32h4|esp32h4|esp32s3'), + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, ) @@ -191,17 +185,18 @@ def test_Bidirectional_IPv6_connectivity(Init_interface:bool, dut: Tuple[IdfDut, # Case 3: Multicast forwarding from Wi-Fi to Thread network -@pytest.mark.esp32s3 -@pytest.mark.esp32h4 +@pytest.mark.supported_targets +@pytest.mark.esp32h2 +@pytest.mark.esp32c6 @pytest.mark.openthread_br @pytest.mark.flaky(reruns=1, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR', 'rcp|cli|br', 3, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', - 'esp32h2beta2|esp32h2beta2|esp32s3', 'esp32h4|esp32h4|esp32s3'), + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, ) @@ -230,17 +225,18 @@ def test_multicast_forwarding_A(Init_interface:bool, dut: Tuple[IdfDut, IdfDut, # Case 4: Multicast forwarding from Thread to Wi-Fi network -@pytest.mark.esp32s3 -@pytest.mark.esp32h4 +@pytest.mark.supported_targets +@pytest.mark.esp32h2 +@pytest.mark.esp32c6 @pytest.mark.openthread_br @pytest.mark.flaky(reruns=1, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR', 'rcp|cli|br', 3, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', - 'esp32h2beta2|esp32h2beta2|esp32s3', 'esp32h4|esp32h4|esp32s3'), + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, ) @@ -281,17 +277,18 @@ def test_multicast_forwarding_B(Init_interface:bool, dut: Tuple[IdfDut, IdfDut, # Case 5: discover dervice published by Thread device -@pytest.mark.esp32s3 -@pytest.mark.esp32h4 +@pytest.mark.supported_targets +@pytest.mark.esp32h2 +@pytest.mark.esp32c6 @pytest.mark.openthread_br @pytest.mark.flaky(reruns=1, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR', 'rcp|cli|br', 3, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', - 'esp32h2beta2|esp32h2beta2|esp32s3', 'esp32h4|esp32h4|esp32s3'), + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, ) @@ -336,17 +333,18 @@ def test_service_discovery_of_Thread_device(Init_interface:bool, Init_avahi:bool # Case 6: discover dervice published by Wi-Fi device -@pytest.mark.esp32s3 -@pytest.mark.esp32h4 +@pytest.mark.supported_targets +@pytest.mark.esp32h2 +@pytest.mark.esp32c6 @pytest.mark.openthread_br @pytest.mark.flaky(reruns=1, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR', 'rcp|cli|br', 3, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', - 'esp32h2beta2|esp32h2beta2|esp32s3', 'esp32h4|esp32h4|esp32s3'), + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, ) @@ -401,17 +399,18 @@ def test_service_discovery_of_WiFi_device(Init_interface:bool, Init_avahi:bool, # Case 7: ICMP communication via NAT64 -@pytest.mark.esp32s3 -@pytest.mark.esp32h4 +@pytest.mark.supported_targets +@pytest.mark.esp32h2 +@pytest.mark.esp32c6 @pytest.mark.openthread_br @pytest.mark.flaky(reruns=1, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR', 'rcp|cli|br', 3, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', - 'esp32h2beta2|esp32h2beta2|esp32s3', 'esp32h4|esp32h4|esp32s3'), + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, ) @@ -435,17 +434,18 @@ def test_ICMP_NAT64(Init_interface:bool, dut: Tuple[IdfDut, IdfDut, IdfDut]) -> # Case 8: UDP communication via NAT64 -@pytest.mark.esp32s3 -@pytest.mark.esp32h4 +@pytest.mark.supported_targets +@pytest.mark.esp32h2 +@pytest.mark.esp32c6 @pytest.mark.openthread_br @pytest.mark.flaky(reruns=1, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR', 'rcp|cli|br', 3, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', - 'esp32h2beta2|esp32h2beta2|esp32s3', 'esp32h4|esp32h4|esp32s3'), + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, ) @@ -487,17 +487,18 @@ def test_UDP_NAT64(Init_interface:bool, dut: Tuple[IdfDut, IdfDut, IdfDut]) -> N # Case 9: TCP communication via NAT64 -@pytest.mark.esp32s3 -@pytest.mark.esp32h4 +@pytest.mark.supported_targets +@pytest.mark.esp32h2 +@pytest.mark.esp32c6 @pytest.mark.openthread_br @pytest.mark.flaky(reruns=1, reruns_delay=1) @pytest.mark.parametrize( - 'port, config, count, app_path, beta_target, target', [ - ('/dev/USB_RCP|/dev/USB_CLI|/dev/USB_BR', 'rcp|cli|br', 3, + 'config, count, app_path, target', [ + ('rcp|cli_h2|br', 3, f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' f'|{os.path.join(os.path.dirname(__file__), "ot_cli")}' f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', - 'esp32h2beta2|esp32h2beta2|esp32s3', 'esp32h4|esp32h4|esp32s3'), + 'esp32c6|esp32h2|esp32s3'), ], indirect=True, )