Skip to content

Commit

Permalink
[CI] Add pairing test for Kotlin API (#29803)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca authored and pull[bot] committed Oct 26, 2023
1 parent 72ba256 commit ad91580
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ jobs:
--tool-args "code --nodeid 1 --setup-payload 34970112332 --discover-once 1 --use-only-onnetwork-discovery 0 -t 1000" \
--factoryreset \
'
- name: Run Pairing Onnetwork Test
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_kotlin_test.py \
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
--app-args "--discriminator 3840 --interface-id -1" \
--tool-path out/linux-x64-kotlin-matter-controller \
--tool-cluster "pairing" \
--tool-args "onnetwork-long --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \
--factoryreset \
'
- name: Run Kotlin IM Invoke Test
run: |
scripts/run_in_python_env.sh out/venv \
Expand Down
12 changes: 11 additions & 1 deletion scripts/tests/run_kotlin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import coloredlogs
from colorama import Fore, Style
from java.base import DumpProgramOutputToQueue
from java.commissioning_test import CommissioningTest
from java.im_test import IMTest


Expand Down Expand Up @@ -96,7 +97,16 @@ def main(app: str, app_args: str, tool_path: str, tool_cluster: str, tool_args:
]),
'com.matter.controller.MainKt']

if tool_cluster == 'im':
if tool_cluster == 'pairing':
logging.info("Testing pairing")

test = CommissioningTest(log_cooking_threads, log_queue, command, tool_args)
try:
test.RunTest()
except Exception as e:
logging.error(e)
sys.exit(1)
elif tool_cluster == 'im':
logging.info("Testing IM")

test = IMTest(log_cooking_threads, log_queue, command, tool_args)
Expand Down

0 comments on commit ad91580

Please sign in to comment.