monkey_driver: Add launch-time option support

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-02-24 15:35:56 +00:00
parent 0b4d1fbb1b
commit c88106e02a
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74

View File

@ -234,8 +234,12 @@ def run_test_step_action_launch(ctx, step):
print(get_indent(ctx) + "Action: " + step["action"]) print(get_indent(ctx) + "Action: " + step["action"])
assert ctx.get('browser') is None assert ctx.get('browser') is None
assert ctx.get('windows') is None assert ctx.get('windows') is None
monkey_cmd = [ctx["monkey"]]
for option in step.get('launch-options', []):
monkey_cmd.append("--{}".format(option))
print(get_indent(ctx) + " " + "Command line: " + repr(monkey_cmd))
ctx['browser'] = DriverBrowser( ctx['browser'] = DriverBrowser(
monkey_cmd=[ctx["monkey"]], monkey_cmd=monkey_cmd,
quiet=True, quiet=True,
wrapper=ctx.get("wrapper")) wrapper=ctx.get("wrapper"))
assert_browser(ctx) assert_browser(ctx)