Closed Bug 554026 Opened 14 years ago Closed 6 years ago

Cleanup common cli options and defaults in our test harnesses and scripts

Categories

(Testing :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jmaher, Unassigned)

References

Details

Currently we have a cli parser for each script (mochitest, reftest, xpcshell.)  In addition we have addCommonOptions() which lives in both automationutils.py and automation.py.

We should ensure all our common options are in the right function and consider removing the duplicated addCommonOptions function.

While doing this we need to standardize on the use of defaults.  There are two methods for this:
1) parser.add_option("--arg", default = [])
2) defaults[arg] = [], parser.set_defaults(**defaults)

I would like to standardize on option 2 with the set_defaults() call.  This will make things easier as we are calling functions in other scripts to set variables and subclassing.
Depends on: 471676, 553700
FYI, there are two addCommonOptions because when I added minidump handling to the xpcshell harness, I wanted to be able to share things like --symbols-path (also, that's when I created automationutils.py in the first place). Most of the options in automation.py's addCommonOptions don't make sense for the xpcshell harness, but they're shared between Mochitest/Reftest.
I like the idea of using the 2nd way of specifying the default arguments.  It feels much more extensible.

Could we have the main xpcshell runner use the combined "addCommonOptions" and then subclass out xpcshell options so that it only accepts and handles what it needs for xpcshell?

This strikes me as a similar problem to what we've already done with the remote test runners where each one implements its own "options" class and then tweaks the default set of options to make sense for their environment.
This bug will revisit the options and see what is valid in which harness and put all common stuff together.  I like the idea of a CoreOptions and its subclass HarnessOptions.
Mass closing bugs with no activity in 2+ years. If this bug is important to you, please re-open.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.