Skip to content

Commit 523fea6

Browse files
hicklinplauric
andauthored
Added the --app-pid flag to the python matter testing support (project-chip#31866)
* Added the --app-pid flag to the python matter testing support to provide a way for test scripts to get the PID of the app they are running against. * fixed typo. Co-authored-by: Petru Lauric <81822411+plauric@users.noreply.github.com> --------- Co-authored-by: Petru Lauric <81822411+plauric@users.noreply.github.com>
1 parent 5e71edd commit 523fea6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/python_testing/matter_testing_support.py

+3
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ class MatterTestConfig:
303303
tests: List[str] = field(default_factory=list)
304304
timeout: typing.Union[int, None] = None
305305
endpoint: int = 0
306+
app_pid: int = 0
306307

307308
commissioning_method: Optional[str] = None
308309
discriminators: Optional[List[int]] = None
@@ -1244,6 +1245,7 @@ def convert_args_to_matter_config(args: argparse.Namespace) -> MatterTestConfig:
12441245
config.tests = [] if args.tests is None else args.tests
12451246
config.timeout = args.timeout # This can be none, we pull the default from the test if it's unspecified
12461247
config.endpoint = 0 if args.endpoint is None else args.endpoint
1248+
config.app_pid = 0 if args.app_pid is None else args.app_pid
12471249

12481250
config.controller_node_id = args.controller_node_id
12491251
config.trace_to = args.trace_to
@@ -1296,6 +1298,7 @@ def parse_matter_test_args(argv: List[str]) -> MatterTestConfig:
12961298
help='Node ID for primary DUT communication, '
12971299
'and NodeID to assign if commissioning (default: %d)' % _DEFAULT_DUT_NODE_ID, nargs="+")
12981300
basic_group.add_argument('--endpoint', type=int, default=0, help="Endpoint under test")
1301+
basic_group.add_argument('--app-pid', type=int, default=0, help="The PID of the app against which the test is going to run")
12991302
basic_group.add_argument('--timeout', type=int, help="Test timeout in seconds")
13001303
basic_group.add_argument("--PICS", help="PICS file path", type=str)
13011304

0 commit comments

Comments
 (0)