Open Bug 1196326 Opened 4 years ago Updated 8 months ago

xpcshell doesn't support --appname

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set

Tracking

(firefox43 affected)

Tracking Status
firefox43 --- affected

People

(Reporter: Gijs, Unassigned)

References

Details

$ ./mach xpcshell-test --appname dist browser/components/migration/tests/unit/test_Edge_availability.js
It looks like you passed an unrecognized argument into mach.

The xpcshell-test command does not accept the arguments: --appname



This made me sad. Don't know why it's only mochitest that knows --appname, but it'd be nice if we included it for xpcshell as well.
Hi, do we have any plan on this?

I'm working on some JAR issues and really need this feature to reproduce locally.
--appname can be used to specify the path to a particular browser binary, for mochitests and reftests. For xpcshell tests, there is a --xpcshell option that can be used to specify the path to xpcshell -- very similar.

--appname is also used determine the "app dir", used notably to find extensions. If --appname=<dir>/<binary>, <dir>/distribution/extensions is searched for .xpi files to install. I don't see any code in the xpcshell harness related to distribution/extensions (and I don't know if that would be appropriate for xpcshell).
(In reply to Geoff Brown [:gbrown] from comment #2)
> --appname can be used to specify the path to a particular browser binary,
> for mochitests and reftests. For xpcshell tests, there is a --xpcshell
> option that can be used to specify the path to xpcshell -- very similar.
> 
> --appname is also used determine the "app dir", used notably to find
> extensions. If --appname=<dir>/<binary>, <dir>/distribution/extensions is
> searched for .xpi files to install. I don't see any code in the xpcshell
> harness related to distribution/extensions (and I don't know if that would
> be appropriate for xpcshell).

3 questions:

- does --xpcshell take the 'dist' argument to use the packaged (result of ./mach package) version? This makes a difference for some tests because of where frontend files live.
- can we alias --appname to --xpcshell for xpcshell instead of having 2 separate arguments?
- can we make ./mach test take --appname and pass it to the relevant test framework?
Flags: needinfo?(gbrown)
(In reply to :Gijs from comment #3)
> - does --xpcshell take the 'dist' argument to use the packaged (result of
> ./mach package) version? This makes a difference for some tests because of
> where frontend files live.

No, it doesn't.

> - can we alias --appname to --xpcshell for xpcshell instead of having 2
> separate arguments?
> - can we make ./mach test take --appname and pass it to the relevant test
> framework?

I think that's possible (but I would want to add support for 'dist' before trying that), but I haven't looked at it closely.

I'll take this bug and try to get to it in January, but my schedule is pretty busy. I'm not sure when I'll find the time, and certainly wouldn't mind if someone took this bug from me. :)
Assignee: nobody → gbrown
Flags: needinfo?(gbrown)
Sorry, can never seem to find time for this...
Assignee: gbrown → nobody
See Also: → 1351253
You need to log in before you can comment on or make changes to this bug.