Closed
Bug 1082686
Opened 10 years ago
Closed 6 years ago
Refactor marionette runner's option handling
Categories
(Remote Protocol :: Marionette, defect, P3)
Remote Protocol
Marionette
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: ahal, Unassigned)
References
Details
(Keywords: pi-marionette-runner)
Currently the default options for the marionette runner live here: http://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runner/base.py#234 This class is a bit clumsy to override. For example, there is no way to remove options that a suite doesn't care about (e.g the emulator related ones). I'd propose a general refactor of how options are handled where we do the following: 1) Move option related logic into its own file. 2) Upgrade to argparse (we have 2.7 across the board, right?) 3) Pull out options that aren't generically useable into their own subclasses (or mixins or whatever) 4) Use technique similar to [1] so it's easy to concatenate and/or slice options. Any objections? [1] http://dxr.mozilla.org/mozilla-central/source/testing/mochitest/mochitest_options.py#36
Comment 1•10 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #0) > 2) Upgrade to argparse (we have 2.7 across the board, right?) I don't think so. At least bug 711299 is still open.
Comment 2•10 years ago
|
||
We are using 2.7.x on all buildbot slaves.
Updated•10 years ago
|
Keywords: ateam-marionette-runner
Comment 3•9 years ago
|
||
Hmm, I don't see why we are building something like a "generic and extendable" command line stuff here. For example: https://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runner/base.py#252 this is about mixins, but I don't see this BaseMarionetteOptions class used in that way anywhere. only mach seems to use that class outside of marionette_client, and not in that way. I would vote for refactoring all this stuff by moving to argparse, remove the "generic and extendable" stuff and just offer a single "main" or "cli" entry point function that mach would use (and the marionnette command line also). What do you think ? And is this not possible for some reason that I am missing ?
Reporter | ||
Comment 4•9 years ago
|
||
Yeah, it has some out of tree consumers in gaia at least, and likely other random Github repos as well: https://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/runtests.py#29
Comment 5•9 years ago
|
||
Hmm, thanks :ahal. I only checked into mozilla-central... Well, forget my previous comment. :)
Comment 6•9 years ago
|
||
Note the work in bug 1163801 if you're thinking of tackling this.
See Also: → 1142064
Blocks: 1238156
Comment 8•6 years ago
|
||
We will probably never get around to fix this considering the vast number of dependencies.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•