Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chiptool.py] Forward extra parameters to the runner #26017

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions scripts/tests/yaml/chiptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@


@click.pass_context
def send_yaml_command(ctx, test_name: str, server_path: str, server_arguments: str, pics: str):
parser_builder_config = ctx.invoke(runner_base, test_name=test_name, pics=pics)
def send_yaml_command(ctx, test_name: str, server_path: str, server_arguments: str, pics: str, commands: list[str]):
kwargs = {'test_name': test_name, 'pics': pics}

index = 0
while len(commands) - index > 1:
kwargs[commands[index].replace('--', '')] = commands[index+1]
index += 2
ctx.invoke(runner_base, **kwargs)

del ctx.params['commands']
del ctx.params['pics']
return ctx.forward(chiptool, parser_builder_config)

return ctx.forward(chiptool)


def send_raw_command(command: str, server_path: str, server_arguments: str):
Expand Down Expand Up @@ -88,7 +95,7 @@ def chiptool_py(ctx, commands: list[str], server_path: str, server_name: str, se
success = False

if len(commands) > 1 and commands[0] == 'tests':
success = send_yaml_command(commands[1], server_path, server_arguments, pics)
success = send_yaml_command(commands[1], server_path, server_arguments, pics, commands[2:])
else:
if server_path is None and server_name:
paths_finder = PathsFinder()
Expand Down