Open Bug 1163755 Opened 9 years ago Updated 2 years ago

XPCShell mach command should use same argument parser as the test harness

Categories

(Testing :: XPCShell Harness, defect)

defect

Tracking

(Not tracked)

People

(Reporter: ahal, Assigned: jgraham)

References

Details

The xpcshell mach command redefines all of the arguments [1] exposed by the xpcshell test harness [2]. This is bad for a few reasons:

* new options need to be defined twice
* makes command line for running locally different from command line when running in production
* encourages multiple entry points into the test harness and separation of features (i.e features that only work when using the mach command).

Instead of re-defining arguments, the mach command should just *use* the xpcshell argument parser directly. This is possible by using the 'parser' argument to the @Command decorator. This was already done for mochitest, so bug 1155338 can be used as a rough guideline.

A pre-requisite to this is getting the xpcshell harness to use argparse instead of optparse.

[1] https://dxr.mozilla.org/mozilla-central/source/testing/xpcshell/mach_commands.py#411
[2] https://dxr.mozilla.org/mozilla-central/source/testing/xpcshell/runxpcshelltests.py#1396
Depends on: 1163756
Summary: Consolidate xpcshell's command line parser across mach and the test harness → XPCShell mach command should use same argument parser as the test harness
I have a branch with this that I need to split up and get reviewed.
Assignee: nobody → james
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.