Closed Bug 1282488 Opened 8 years ago Closed 8 years ago

Warn about unused `--binary` option in `mach marionette-test`

Categories

(Remote Protocol :: Marionette, defect)

Version 3
defect
Not set
normal

Tracking

(firefox50 fixed)

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: vakila, Assigned: vakila)

References

Details

Attachments

(1 file)

As described in Bug 1252609, the `marionette-test` mach command ignores any supplied `--binary` option, in favor of the binary found by `self.get_binary_path` [1]. It would be nice to warn users about this if they try to use `--binary`, instead of ignoring it silently.

[1] https://dxr.mozilla.org/mozilla-central/source/testing/marionette/mach_commands.py#150
If a user passes the `--binary` option to the `marionette-test` mach command,
instead of silently ignoring the given path in favor of `self.get_binary_path`,
print a warning message and the path to the binary being used.

Review commit: https://reviewboard.mozilla.org/r/60858/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/60858/
Attachment #8765543 - Flags: review?(mjzffr)
Comment on attachment 8765543 [details]
Bug 1282488 - Warn about unused `--binary` option in `mach marionette-test`;

https://reviewboard.mozilla.org/r/60858/#review57780

Thanks!
Attachment #8765543 - Flags: review?(mjzffr) → review+
Pushed by mjzffr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff3138a7b682
Warn about unused `--binary` option in `mach marionette-test`; r=maja_zf
It would be better if this only warned when kwargs['binary'] starts out as None -- could you write a follow-up patch for that, please?
Flags: needinfo?(anjanavakil)
(In reply to Maja Frydrychowicz (:maja_zf) from comment #4)
> It would be better if this only warned when kwargs['binary'] starts out as
> None -- could you write a follow-up patch for that, please?

I'm guessing you mean when kwargs['binary'] is NOT None, and thanks for catching that, because this is broken as is since I guess 'binary' gets added to kwargs by the parser no matter what. My bad, fixing now.
Flags: needinfo?(anjanavakil)
Blocks: 1282755
https://hg.mozilla.org/mozilla-central/rev/ff3138a7b682
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: