mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Allow screen URL pattern to be changed.
This commit is contained in:
parent
91b1861d8d
commit
2d4d24a19d
2 changed files with 30 additions and 7 deletions
19
lib/cli.js
19
lib/cli.js
|
@ -59,6 +59,12 @@ program
|
|||
, 'ADB port (defaults to 5037)'
|
||||
, Number
|
||||
, 5037)
|
||||
.option('--screen-ws-url-pattern <pattern>'
|
||||
, 'screen WebSocket URL pattern'
|
||||
, String
|
||||
, 'ws://${publicIp}:${publicPort}')
|
||||
.option('--disable-screen-public-proxy'
|
||||
, 'no public proxy for screen')
|
||||
.action(function() {
|
||||
var serials = cliutil.allUnknownArgs(arguments)
|
||||
, options = cliutil.lastArg(arguments)
|
||||
|
@ -94,7 +100,10 @@ program
|
|||
, '--storage-url', options.storageUrl
|
||||
, '--adb-host', options.adbHost
|
||||
, '--adb-port', options.adbPort
|
||||
])
|
||||
, '--screen-ws-url-pattern', options.screenWsUrlPattern
|
||||
]
|
||||
.concat(options.disableScreenPublicProxy
|
||||
? ['--disable-screen-public-proxy'] : []))
|
||||
}
|
||||
, endpoints: {
|
||||
sub: options.connectSub
|
||||
|
@ -139,6 +148,12 @@ program
|
|||
, 'ADB port (defaults to 5037)'
|
||||
, Number
|
||||
, 5037)
|
||||
.option('--screen-ws-url-pattern <pattern>'
|
||||
, 'screen WebSocket URL pattern'
|
||||
, String
|
||||
, 'ws://${publicIp}:${publicPort}')
|
||||
.option('--disable-screen-public-proxy'
|
||||
, 'no public proxy for screen')
|
||||
.action(function(serial, options) {
|
||||
if (!options.connectSub) {
|
||||
this.missingArgument('--connect-sub')
|
||||
|
@ -169,6 +184,8 @@ program
|
|||
, storageUrl: options.storageUrl
|
||||
, adbHost: options.adbHost
|
||||
, adbPort: options.adbPort
|
||||
, disableScreenPublicProxy: !!options.disableScreenPublicProxy
|
||||
, screenWsUrlPattern: options.screenWsUrlPattern
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue