Skip to content

Commit 1008b46

Browse files
Run THNETDIR tests against network-manager app in CI
1 parent 49afe2a commit 1008b46

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

.github/workflows/tests.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ jobs:
185185
src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml \
186186
src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml \
187187
src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml \
188+
src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml \
188189
src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml \
189190
src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \
190191
src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml \
@@ -222,6 +223,7 @@ jobs:
222223
--target linux-x64-lit-icd-${BUILD_VARIANT} \
223224
--target linux-x64-microwave-oven-${BUILD_VARIANT} \
224225
--target linux-x64-rvc-${BUILD_VARIANT} \
226+
--target linux-x64-network-manager-${BUILD_VARIANT} \
225227
build \
226228
--copy-artifacts-to objdir-clone \
227229
"
@@ -244,6 +246,7 @@ jobs:
244246
--lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
245247
--microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
246248
--rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
249+
--network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
247250
"
248251
249252
- name: Run purposeful failure tests using the python parser sending commands to chip-tool
@@ -285,6 +288,7 @@ jobs:
285288
--lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
286289
--microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
287290
--rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
291+
--network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
288292
"
289293
- name: Run Tests using chip-repl (including slow)
290294
if: github.event_name == 'push'
@@ -304,6 +308,7 @@ jobs:
304308
--lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
305309
--microwave-oven-app ./out/linux-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
306310
--rvc-app ./out/linux-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
311+
--network-manager-app ./out/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
307312
"
308313
- name: Uploading core files
309314
uses: actions/upload-artifact@v4
@@ -372,6 +377,7 @@ jobs:
372377
--target darwin-x64-lit-icd-${BUILD_VARIANT} \
373378
--target darwin-x64-microwave-oven-${BUILD_VARIANT} \
374379
--target darwin-x64-rvc-${BUILD_VARIANT} \
380+
--target darwin-x64-network-manager-${BUILD_VARIANT} \
375381
build \
376382
--copy-artifacts-to objdir-clone \
377383
"
@@ -395,6 +401,7 @@ jobs:
395401
--lit-icd-app ./out/darwin-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \
396402
--microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
397403
--rvc-app ./out/darwin-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
404+
--network-manager-app ./out/darwin-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
398405
"
399406
400407
- name: Run purposeful failure tests using the python parser sending commands to chip-tool

scripts/tests/chiptest/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ def target_for_name(name: str):
286286
return TestTarget.MWO
287287
if name.startswith("Test_TC_RVCRUNM_") or name.startswith("Test_TC_RVCCLEANM_") or name.startswith("Test_TC_RVCOPSTATE_"):
288288
return TestTarget.RVC
289+
if name.startswith("Test_TC_THNETDIR_"):
290+
return TestTarget.NETWORK_MANAGER
289291
return TestTarget.ALL_CLUSTERS
290292

291293

scripts/tests/chiptest/linux.py

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def PathsWithNetworkNamespaces(paths: ApplicationPaths) -> ApplicationPaths:
184184
lit_icd_app='ip netns exec app'.split() + paths.lit_icd_app,
185185
microwave_oven_app='ip netns exec app'.split() + paths.microwave_oven_app,
186186
rvc_app='ip netns exec app'.split() + paths.rvc_app,
187+
network_manager_app='ip netns exec app'.split() + paths.network_manager_app,
187188
bridge_app='ip netns exec app'.split() + paths.bridge_app,
188189
chip_repl_yaml_tester_cmd='ip netns exec tool'.split() + paths.chip_repl_yaml_tester_cmd,
189190
chip_tool_with_python_cmd='ip netns exec tool'.split() + paths.chip_tool_with_python_cmd,

scripts/tests/chiptest/test_definition.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ class TestTarget(Enum):
177177
LIT_ICD = auto()
178178
MWO = auto()
179179
RVC = auto()
180+
NETWORK_MANAGER = auto()
180181

181182

182183
@dataclass
@@ -193,10 +194,11 @@ class ApplicationPaths:
193194
chip_repl_yaml_tester_cmd: typing.List[str]
194195
chip_tool_with_python_cmd: typing.List[str]
195196
rvc_app: typing.List[str]
197+
network_manager_app: typing.List[str]
196198

197199
def items(self):
198200
return [self.chip_tool, self.all_clusters_app, self.lock_app, self.ota_provider_app, self.ota_requestor_app,
199-
self.tv_app, self.bridge_app, self.lit_icd_app, self.microwave_oven_app, self.chip_repl_yaml_tester_cmd, self.chip_tool_with_python_cmd, self.rvc_app]
201+
self.tv_app, self.bridge_app, self.lit_icd_app, self.microwave_oven_app, self.chip_repl_yaml_tester_cmd, self.chip_tool_with_python_cmd, self.rvc_app, self.network_manager_app]
200202

201203

202204
@dataclass
@@ -309,6 +311,8 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str,
309311
target_app = paths.microwave_oven_app
310312
elif self.target == TestTarget.RVC:
311313
target_app = paths.rvc_app
314+
elif self.target == TestTarget.NETWORK_MANAGER:
315+
target_app = paths.network_manager_app
312316
else:
313317
raise Exception("Unknown test target - "
314318
"don't know which application to run")

scripts/tests/run_test_suite.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ def cmd_list(context):
260260
@click.option(
261261
'--rvc-app',
262262
help='what rvc app to use')
263+
@click.option(
264+
'--network-manager-app',
265+
help='what network-manager app to use')
263266
@click.option(
264267
'--chip-repl-yaml-tester',
265268
help='what python script to use for running yaml tests using chip-repl as controller')
@@ -291,7 +294,7 @@ def cmd_list(context):
291294
help='Number of tests that are expected to fail in each iteration. Overall test will pass if the number of failures matches this. Nonzero values require --keep-going')
292295
@click.pass_context
293296
def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, ota_requestor_app,
294-
tv_app, bridge_app, lit_icd_app, microwave_oven_app, rvc_app, chip_repl_yaml_tester, chip_tool_with_python, pics_file, keep_going, test_timeout_seconds, expected_failures):
297+
tv_app, bridge_app, lit_icd_app, microwave_oven_app, rvc_app, network_manager_app, chip_repl_yaml_tester, chip_tool_with_python, pics_file, keep_going, test_timeout_seconds, expected_failures):
295298
if expected_failures != 0 and not keep_going:
296299
logging.exception(f"'--expected-failures {expected_failures}' used without '--keep-going'")
297300
sys.exit(2)
@@ -327,6 +330,9 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o
327330
if rvc_app is None:
328331
rvc_app = paths_finder.get('chip-rvc-app')
329332

333+
if network_manager_app is None:
334+
network_manager_app = paths_finder.get('matter-network-manager-app')
335+
330336
if chip_repl_yaml_tester is None:
331337
chip_repl_yaml_tester = paths_finder.get('yamltest_with_chip_repl_tester.py')
332338

@@ -348,6 +354,7 @@ def cmd_run(context, iterations, all_clusters_app, lock_app, ota_provider_app, o
348354
lit_icd_app=[lit_icd_app],
349355
microwave_oven_app=[microwave_oven_app],
350356
rvc_app=[rvc_app],
357+
network_manager_app=[network_manager_app],
351358
chip_repl_yaml_tester_cmd=['python3'] + [chip_repl_yaml_tester],
352359
chip_tool_with_python_cmd=['python3'] + [chip_tool_with_python],
353360
)

src/app/tests/suites/certification/ci-pics-values

+4-1
Original file line numberDiff line numberDiff line change
@@ -2987,4 +2987,7 @@ PWRTL.S.A0001=1
29872987
PWRTL.S.F00=0
29882988
PWRTL.S.F01=0
29892989
PWRTL.S.F02=1
2990-
PWRTL.S.F03=1
2990+
PWRTL.S.F03=1
2991+
2992+
# Thread Network Directory Cluster
2993+
THNETDIR.S=1

0 commit comments

Comments
 (0)