Skip to content

Commit

Permalink
ci/chip-tool : [v1.1] Removed the redundant chip-tool builds from CI …
Browse files Browse the repository at this point in the history
…using the one built during install.sh
  • Loading branch information
shripad621git committed Jan 11, 2024
1 parent abcfe75 commit 722b44d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
16 changes: 3 additions & 13 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions examples/pytest_esp_matter_light.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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
Expand All @@ -33,23 +33,23 @@ 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))
if len(result) != 0:
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))
if len(result) != 0:
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))
Expand All @@ -72,23 +72,23 @@ 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))
if len(result) != 0:
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))
if len(result) != 0:
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))
Expand Down Expand Up @@ -213,23 +213,23 @@ 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))
if len(result) != 0:
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))
if len(result) != 0:
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))
Expand Down

0 comments on commit 722b44d

Please sign in to comment.