diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9108f57fa..232fa1042 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,13 +93,6 @@ variables: - ./install.sh - . ./export.sh -.build_chip_tool: &build_chip_tool - - cd ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip - - source scripts/activate.sh - - cd ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip/examples/chip-tool - - gn gen out - - ninja -C out - .build_matter_examples: &build_matter_examples - export MATTER_EXAMPLES_PATH=$ESP_MATTER_PATH/connectedhomeip/connectedhomeip/examples - cd $MATTER_EXAMPLES_PATH/all-clusters-app/esp32 @@ -160,7 +153,7 @@ build_esp_matter_examples_pytest_C6_idf_v5_1: - "examples/**/build*/config/sdkconfig.json" - "examples/**/build*/bootloader/*.bin" - "examples/**/build*/partition_table/*.bin" - - "connectedhomeip/connectedhomeip/examples/chip-tool/out/chip-tool" + - "connectedhomeip/connectedhomeip/out/host/chip-tool" when: always expire_in: 4 days variables: @@ -169,7 +162,6 @@ build_esp_matter_examples_pytest_C6_idf_v5_1: - cd ${ESP_MATTER_PATH} - pip install -r tools/ci/requirements-build.txt - python tools/ci/build_apps.py ./examples --pytest_c6 - - *build_chip_tool build_esp_matter_examples_pytest_H2_idf_v5_1: extends: @@ -193,7 +185,7 @@ build_esp_matter_examples_pytest_H2_idf_v5_1: - "${BR_PATH}/examples/basic_thread_border_router/build/bootloader/*.bin" - "${BR_PATH}/examples/basic_thread_border_router/build/config/sdkconfig.json" - "${BR_PATH}/examples/basic_thread_border_router/build/flasher_args.json" - - "connectedhomeip/connectedhomeip/examples/chip-tool/out/chip-tool" + - "connectedhomeip/connectedhomeip/out/host/chip-tool" when: always expire_in: 4 days variables: @@ -204,7 +196,6 @@ build_esp_matter_examples_pytest_H2_idf_v5_1: - cd ${ESP_MATTER_PATH} - pip install -r tools/ci/requirements-build.txt - python tools/ci/build_apps.py ./examples --pytest_h2 - - *build_chip_tool build_esp_matter_examples_non_pytest_idf_v5_1: extends: @@ -241,7 +232,7 @@ build_esp_matter_examples_pytest_C3_idf_v4_4: - "examples/**/build*/config/sdkconfig.json" - "examples/**/build*/bootloader/*.bin" - "examples/**/build*/partition_table/*.bin" - - "connectedhomeip/connectedhomeip/examples/chip-tool/out/chip-tool" + - "connectedhomeip/connectedhomeip/out/host/chip-tool" when: always expire_in: 4 days variables: @@ -250,7 +241,6 @@ build_esp_matter_examples_pytest_C3_idf_v4_4: - cd ${ESP_MATTER_PATH} - pip install -r tools/ci/requirements-build.txt - python tools/ci/build_apps.py ./examples --pytest_c3 - - *build_chip_tool pytest_esp32c3_esp_matter_dut: stage: target_test diff --git a/examples/pytest_esp_matter_light.py b/examples/pytest_esp_matter_light.py index e628f7d80..62ea652c3 100644 --- a/examples/pytest_esp_matter_light.py +++ b/examples/pytest_esp_matter_light.py @@ -11,7 +11,7 @@ from typing import Tuple from pytest_embedded import Dut CURRENT_DIR_LIGHT = str(pathlib.Path(__file__).parent)+'/light' -CHIP_TOOL_DIR = str(pathlib.Path(__file__).parent)+'/../connectedhomeip/connectedhomeip/examples/chip-tool' +CHIP_TOOL_EXE = str(pathlib.Path(__file__).parent)+ '/../connectedhomeip/connectedhomeip/out/host/chip-tool' OT_BR_EXAMPLE_PATH = str(pathlib.Path(__file__).parent)+'/../esp-thread-br/examples/basic_thread_border_router' pytest_build_dir = CURRENT_DIR_LIGHT pytest_matter_thread_dir = CURRENT_DIR_LIGHT+'|'+OT_BR_EXAMPLE_PATH @@ -33,7 +33,7 @@ def test_matter_commissioning_c3(dut:Dut) -> None: light.expect(r'chip\[DL\]\: Configuring CHIPoBLE advertising', timeout=20) # Start commissioning time.sleep(5) - command = CHIP_TOOL_DIR+'/out/chip-tool pairing ble-wifi 1 ChipTEH2 chiptest123 20202021 3840' + command = CHIP_TOOL_EXE + ' pairing ble-wifi 1 ChipTEH2 chiptest123 20202021 3840' out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str)) @@ -41,7 +41,7 @@ def test_matter_commissioning_c3(dut:Dut) -> None: assert False # Use toggle command to turn-off the light time.sleep(3) - command = CHIP_TOOL_DIR+'/out/chip-tool onoff toggle 1 1' + command = CHIP_TOOL_EXE + ' onoff toggle 1 1' out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str)) @@ -49,7 +49,7 @@ def test_matter_commissioning_c3(dut:Dut) -> None: assert False # Use toggle command to turn-on the light time.sleep(5) - command = CHIP_TOOL_DIR+'/out/chip-tool onoff toggle 1 1' + command = CHIP_TOOL_EXE + ' onoff toggle 1 1' out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str)) @@ -72,7 +72,7 @@ def test_matter_commissioning_c6(dut:Dut) -> None: light.expect(r'chip\[DL\]\: Configuring CHIPoBLE advertising', timeout=20) # Start commissioning time.sleep(5) - command = CHIP_TOOL_DIR+'/out/chip-tool pairing ble-wifi 1 ChipTEH2 chiptest123 20202021 3840' + command = CHIP_TOOL_EXE + ' pairing ble-wifi 1 ChipTEH2 chiptest123 20202021 3840' out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str)) @@ -80,7 +80,7 @@ def test_matter_commissioning_c6(dut:Dut) -> None: assert False # Use toggle command to turn-off the light time.sleep(3) - command = CHIP_TOOL_DIR+'/out/chip-tool onoff toggle 1 1' + command = CHIP_TOOL_EXE + ' onoff toggle 1 1' out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str)) @@ -88,7 +88,7 @@ def test_matter_commissioning_c6(dut:Dut) -> None: assert False # Use toggle command to turn-on the light time.sleep(5) - command = CHIP_TOOL_DIR+'/out/chip-tool onoff toggle 1 1' + command = CHIP_TOOL_EXE + ' onoff toggle 1 1' out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str)) @@ -213,7 +213,7 @@ def test_matter_commissioning_h2(dut:Tuple[Dut, Dut]) -> None: print(dataset) # Start commissioning time.sleep(2) - command = CHIP_TOOL_DIR+"/out/chip-tool pairing ble-thread 1 hex:{} ".format(dataset.strip())+"20202021 3840" + command = CHIP_TOOL_EXE + " pairing ble-thread 1 hex:{} ".format(dataset.strip())+"20202021 3840" out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str)) @@ -221,7 +221,7 @@ def test_matter_commissioning_h2(dut:Tuple[Dut, Dut]) -> None: assert False # Use toggle command to turn-off the light time.sleep(2) - command = CHIP_TOOL_DIR+'/out/chip-tool onoff toggle 1 1' + command = CHIP_TOOL_EXE + ' onoff toggle 1 1' out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str)) @@ -229,7 +229,7 @@ def test_matter_commissioning_h2(dut:Tuple[Dut, Dut]) -> None: assert False # Use toggle command to turn-on the light time.sleep(2) - command = CHIP_TOOL_DIR+'/out/chip-tool onoff toggle 1 1' + command = CHIP_TOOL_EXE + ' onoff toggle 1 1' out_str = subprocess.getoutput(command) print(out_str) result = re.findall(r'Run command failure', str(out_str))