[MozDevice] Accept variables from the environment to set adb host and port in commands

RESOLVED FIXED

Status

Firefox OS
Gaia::PerformanceTest
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Eli, Assigned: Eli)

Tracking

({perf})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

3 years ago
For automation there is going to be a new remote device lab in which commands are not sent to a direct device connection but rather are done via host and port connection. Raptor needs to accept environment variables for these arguments.
(Assignee)

Updated

3 years ago
Summary: [Raptor] Accept variables from the environment to set adb host and port in commands → [MozDevice] Accept variables from the environment to set adb host and port in commands
(Assignee)

Comment 1

3 years ago
Created attachment 8577283 [details] [review]
Link to Github pull-request: https://github.com/eliperelman/node-mozdevice/pull/11

This patch allows Raptor to run commands against a remote device by specifying the environment variables ADB_HOST and ADB_PORT to the test in Gaia, e.g.:

ADB_HOST=192.168.1.10 ADB_PORT=5037 DEBUG=* RUNS=1 APP=clock node tests/raptor/launch_test

After getting a remote device working and specifying -H and -P on each command, I was surprised by how seamlessly this operated; it really felt like the device was still on my local machine. :D
Attachment #8577283 - Flags: review?(rwood)
Attachment #8577283 - Flags: feedback?(dave.hunt)
(Assignee)

Comment 2

3 years ago
You can save from having to put ADB_HOST and ADB_PORT in the command line constantly by placing them with .env file variables that the other Raptor env variables use.
Comment on attachment 8577283 [details] [review]
Link to Github pull-request: https://github.com/eliperelman/node-mozdevice/pull/11

Looks great, thanks Eli!
Attachment #8577283 - Flags: feedback?(dave.hunt) → feedback+

Comment 4

3 years ago
Comment on attachment 8577283 [details] [review]
Link to Github pull-request: https://github.com/eliperelman/node-mozdevice/pull/11

LGTM and R+ based on that you tested it out with your own remote device setup.
Attachment #8577283 - Flags: review?(rwood) → review+
Created attachment 8580711 [details] [review]
[gaia-node-modules] eliperelman:bug-1141573 > mozilla-b2g:master
(Assignee)

Comment 6

3 years ago
Comment on attachment 8580711 [details] [review]
[gaia-node-modules] eliperelman:bug-1141573 > mozilla-b2g:master

Carrying over r+ for package bump.
Attachment #8580711 - Flags: review+
Created attachment 8580713 [details] [review]
[gaia] eliperelman:bug-1141573 > mozilla-b2g:master
(Assignee)

Comment 8

3 years ago
Comment on attachment 8580713 [details] [review]
[gaia] eliperelman:bug-1141573 > mozilla-b2g:master

Carrying over r+ for package bump.
Attachment #8580713 - Flags: review+
(Assignee)

Comment 9

3 years ago
In master: https://github.com/mozilla-b2g/gaia/commit/69c230da400089c4311ce82867e26f266e648c6f
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.