Closed Bug 1550518 Opened 5 years ago Closed 4 years ago

mach xpcshell-test should support the --headless argument

Categories

(Testing :: XPCShell Harness, defect, P3)

Version 3
defect

Tracking

(firefox77 fixed)

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: bzbarsky, Assigned: MattN)

Details

(Whiteboard: dev-prod-2020)

Attachments

(1 file)

STEPS TO REPRODUCE: Run "mach test --headless dom/push"

EXPECTED RESULTS: Runs all the dom/push tests (mochitest and xpcshell), with the mochitests running headless.

ACTUAL RESULTS: Runs the mochitests headless, then errors out with:

  mach: error: unrecognized arguments for xpcshell-test: '--headless'

:ahal - Do you have thoughts or a vision for the generic issue here? Should all the harnesses recognize the same options, or should 'mach test' filter options, or ...?

Flags: needinfo?(ahal)
Priority: -- → P3

I don't think all harnesses should support all options (that would get very messy very fast). But in this case since xpcshell is headless anyway and since --headless is a pretty common argument to want to pass, I think it's fine to add this in a one-off manner (with help=argparse.SUPPRESS).

But yeah, longer term I think we need to do some filtering in |mach test|. Maybe if a harness doesn't support an arg we print a warning that we aren't passing it in. I'd also love if there were a base argument parser that all harnesses used where we could define common args (with the ability to "mix in" groups of args).

Flags: needinfo?(ahal)
Whiteboard: dev-prod-2020

This annoys me almost everyday as I'm working in a component with 2 flavours of mochitest plus xpcshell-test and I can't use a single command to run all tests.

Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED

Entries in the xpcshell.ini manifest override the default specified on the command line.

Summary: mach xpcshell-test should maybe support a (no-op) --headless argument → mach xpcshell-test should support the --headless argument
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/autoland/rev/b6b3c5580dc2
Add --headless support for xpcshell-test. r=gbrown
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: