Add a way to specify environment variables on Android
Categories
(Testing :: mozregression, enhancement)
Tracking
(Not tracked)
People
(Reporter: botond, Assigned: botond)
Details
On desktop, mozregression automatically propagates environment variables to the Firefox process it invokes. For example, if I run:
$ MOZ_LOG="apz.controller:5" mozregression -B debug -P stdout --launch 2020-03-16
mozregression will launch today's debug build and it will produce logging for the "apz.controller" module at verbosity "5".
On Android there does not appear to be a way to do this. It would be nice to add one.
We may not want to enable automatic propagation of environment variables like for desktop, but there could be a flag along the lines of --setenv MOZ_LOG="apz.controller:5".
| Assignee | ||
Comment 1•5 years ago
|
||
Note that test harnesses like mochitest and reftest support this:
--setenv NAME=VALUE Sets the given variable in the application's
environment.
and it works on Android, so there is support for this at some layer.
| Assignee | ||
Comment 2•5 years ago
|
||
Looks like there is support for this in mozdevice, and the way to engage it would be to pass a moz_env parameter to the launch_activity() call.
| Assignee | ||
Comment 3•5 years ago
•
|
||
(In reply to Botond Ballo [:botond] from comment #2)
Looks like there is support for this in
mozdevice, and the way to engage it would be to pass amoz_envparameter to thelaunch_activity()call.
I hacked a local mozregression build to pass in such a parameter, but it didn't seem to have the intended effect of activating logging. I'm not sure why.
| Assignee | ||
Comment 4•5 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #3)
I hacked a local mozregression build to pass in such a parameter, but it didn't seem to have the intended effect of activating logging. I'm not sure why.
The issue seems to be that I was unnecessarily quoting the env var's value, which seems to mess things up (I guess mozdevice handles quoting if necessary itself). With the quotes removed, it works fine.
| Assignee | ||
Updated•5 years ago
|
Updated•3 years ago
|
Description
•