Skip to content

Commit

Permalink
Add back argv for parsing config params
Browse files Browse the repository at this point in the history
Supports TH implementation.
  • Loading branch information
cecille committed Mar 7, 2024
1 parent 53aefb8 commit ff7e22a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/python_testing/matter_testing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ def convert_args_to_matter_config(args: argparse.Namespace) -> MatterTestConfig:
return config


def parse_matter_test_args() -> MatterTestConfig:
def parse_matter_test_args(argv: Optional[List[str]] = None) -> MatterTestConfig:
parser = argparse.ArgumentParser(description='Matter standalone Python test')

basic_group = parser.add_argument_group(title="Basic arguments", description="Overall test execution arguments")
Expand Down Expand Up @@ -1532,7 +1532,9 @@ def parse_matter_test_args() -> MatterTestConfig:
args_group.add_argument('--hex-arg', nargs='*', type=bytes_as_hex_named_arg, metavar="NAME:VALUE",
help="Add a named test argument for an octet string in hex (e.g. 0011cafe or 00:11:CA:FE)")

argv = sys.argv[1:]
if not argv:
argv = sys.argv[1:]

return convert_args_to_matter_config(parser.parse_known_args(argv)[0])


Expand Down

0 comments on commit ff7e22a

Please sign in to comment.