Skip to content

Commit

Permalink
Added the --app-pid flag to the python matter testing support (#31866)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

---------

Co-authored-by: Petru Lauric <[email protected]>
  • Loading branch information
hicklin and plauric authored Feb 5, 2024
1 parent 5e71edd commit 523fea6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/python_testing/matter_testing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ class MatterTestConfig:
tests: List[str] = field(default_factory=list)
timeout: typing.Union[int, None] = None
endpoint: int = 0
app_pid: int = 0

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

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

Expand Down

0 comments on commit 523fea6

Please sign in to comment.