mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Make it possible to connect to ADB running on other computers.
This commit is contained in:
parent
2e18778d1c
commit
7fb721f379
3 changed files with 40 additions and 2 deletions
32
lib/cli.js
32
lib/cli.js
|
@ -50,6 +50,14 @@ program
|
|||
, 'heartbeat interval'
|
||||
, Number
|
||||
, 10000)
|
||||
.option('--adb-host <host>'
|
||||
, 'ADB host (defaults to 127.0.0.1)'
|
||||
, String
|
||||
, '127.0.0.1')
|
||||
.option('--adb-port <port>'
|
||||
, 'ADB port (defaults to 5037)'
|
||||
, Number
|
||||
, 5037)
|
||||
.action(function() {
|
||||
var serials = cliutil.allUnknownArgs(arguments)
|
||||
, options = cliutil.lastArg(arguments)
|
||||
|
@ -83,12 +91,16 @@ program
|
|||
, '--public-ip', options.publicIp
|
||||
, '--group-timeout', options.groupTimeout
|
||||
, '--storage-url', options.storageUrl
|
||||
, '--adb-host', options.adbHost
|
||||
, '--adb-port', options.adbPort
|
||||
])
|
||||
}
|
||||
, endpoints: {
|
||||
sub: options.connectSub
|
||||
, push: options.connectPush
|
||||
}
|
||||
, adbHost: options.adbHost
|
||||
, adbPort: options.adbPort
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -118,6 +130,14 @@ program
|
|||
.option('-r, --storage-url <url>'
|
||||
, 'URL to storage client'
|
||||
, String)
|
||||
.option('--adb-host <host>'
|
||||
, 'ADB host (defaults to 127.0.0.1)'
|
||||
, String
|
||||
, '127.0.0.1')
|
||||
.option('--adb-port <port>'
|
||||
, 'ADB port (defaults to 5037)'
|
||||
, Number
|
||||
, 5037)
|
||||
.action(function(serial, options) {
|
||||
if (!options.connectSub) {
|
||||
this.missingArgument('--connect-sub')
|
||||
|
@ -146,6 +166,8 @@ program
|
|||
}
|
||||
, groupTimeout: options.groupTimeout * 1000 // change to ms
|
||||
, storageUrl: options.storageUrl
|
||||
, adbHost: options.adbHost
|
||||
, adbPort: options.adbPort
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -692,6 +714,14 @@ program
|
|||
, 'public ip for global access'
|
||||
, String
|
||||
, 'localhost')
|
||||
.option('--adb-host <host>'
|
||||
, 'ADB host (defaults to 127.0.0.1)'
|
||||
, String
|
||||
, '127.0.0.1')
|
||||
.option('--adb-port <port>'
|
||||
, 'ADB port (defaults to 5037)'
|
||||
, Number
|
||||
, 5037)
|
||||
.action(function() {
|
||||
var log = logger.createLogger('cli:local')
|
||||
, args = arguments
|
||||
|
@ -750,6 +780,8 @@ program
|
|||
, '--public-ip', options.publicIp
|
||||
, '--storage-url'
|
||||
, util.format('http://localhost:%d/', options.storagePort)
|
||||
, '--adb-host', options.adbHost
|
||||
, '--adb-port', options.adbPort
|
||||
].concat(cliutil.allUnknownArgs(args)))
|
||||
|
||||
// auth-mock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue