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

NEW
Unassigned

Status

defect
4 years ago
4 years ago

People

(Reporter: ahal, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

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

* 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 harness' argument parser directly. This is possible by using the 'parser' argument to the @Command decorator in mach. This was already done for mochitest, so bug 1155338 can be used as a rough guideline.

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

[1] https://dxr.mozilla.org/mozilla-central/source/layout/tools/reftest/mach_commands.py#317
[2] https://dxr.mozilla.org/mozilla-central/source/layout/tools/reftest/runreftest.py#655
Depends on: 1163795
You need to log in before you can comment on or make changes to this bug.