mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 00:03:28 +02:00
options to disable bluetooth and/or clean bonded (paired) devices (#758)
Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com>
This commit is contained in:
committed by
GitHub
parent
806bfa4087
commit
a6b5f18941
@@ -29,6 +29,16 @@ module.exports.builder = function(yargs) {
|
||||
, type: 'boolean'
|
||||
, default: true
|
||||
})
|
||||
.option('cleanup-disable-bluetooth', {
|
||||
describe: 'Whether to disable Bluetooth during cleanup.'
|
||||
, type: 'boolean'
|
||||
, default: false
|
||||
})
|
||||
.option('cleanup-bluetooth-bonds', {
|
||||
describe: 'Whether to remove Bluetooth bonds during cleanup.'
|
||||
, type: 'boolean'
|
||||
, default: false
|
||||
})
|
||||
.option('connect-port', {
|
||||
describe: 'Port allocated to adb connections.'
|
||||
, type: 'number'
|
||||
@@ -189,6 +199,8 @@ module.exports.handler = function(argv) {
|
||||
, muteMaster: argv.muteMaster
|
||||
, lockRotation: argv.lockRotation
|
||||
, cleanup: argv.cleanup
|
||||
, cleanupDisableBluetooth: argv.cleanupDisableBluetooth
|
||||
, cleanupBluetoothBonds: argv.cleanupBluetoothBonds
|
||||
, screenReset: argv.screenReset
|
||||
})
|
||||
}
|
||||
|
||||
@@ -109,6 +109,16 @@ module.exports.builder = function(yargs) {
|
||||
, type: 'boolean'
|
||||
, default: true
|
||||
})
|
||||
.option('cleanup-disable-bluetooth', {
|
||||
describe: 'Whether to disable Bluetooth during cleanup.'
|
||||
, type: 'boolean'
|
||||
, default: false
|
||||
})
|
||||
.option('cleanup-bluetooth-bonds', {
|
||||
describe: 'Whether to remove Bluetooth bonds during cleanup.'
|
||||
, type: 'boolean'
|
||||
, default: false
|
||||
})
|
||||
.option('group-timeout', {
|
||||
alias: 't'
|
||||
, describe: 'Timeout in seconds for automatic release of inactive devices.'
|
||||
@@ -306,6 +316,8 @@ module.exports.handler = function(argv) {
|
||||
.concat(argv.allowRemote ? ['--allow-remote'] : [])
|
||||
.concat(argv.lockRotation ? ['--lock-rotation'] : [])
|
||||
.concat(!argv.cleanup ? ['--no-cleanup'] : [])
|
||||
.concat(argv.cleanupDisableBluetooth ? ['--cleanup-disable-bluetooth'] : [])
|
||||
.concat(argv.cleanupBluetoothBonds ? ['--cleanup-bluetooth-bonds'] : [])
|
||||
.concat(!argv.screenReset ? ['--no-screen-reset'] : [])
|
||||
.concat(argv.serial))
|
||||
|
||||
|
||||
@@ -43,6 +43,16 @@ module.exports.builder = function(yargs) {
|
||||
, type: 'boolean'
|
||||
, default: true
|
||||
})
|
||||
.option('cleanup-disable-bluetooth', {
|
||||
describe: 'Whether to disable Bluetooth during cleanup.'
|
||||
, type: 'boolean'
|
||||
, default: false
|
||||
})
|
||||
.option('cleanup-bluetooth-bonds', {
|
||||
describe: 'Whether to remove Bluetooth bonds during cleanup.'
|
||||
, type: 'boolean'
|
||||
, default: false
|
||||
})
|
||||
.option('connect-push', {
|
||||
alias: 'p'
|
||||
, describe: 'Device-side ZeroMQ PULL endpoint to connect to.'
|
||||
@@ -223,6 +233,8 @@ module.exports.handler = function(argv) {
|
||||
}, []))
|
||||
.concat(argv.lockRotation ? ['--lock-rotation'] : [])
|
||||
.concat(!argv.cleanup ? ['--no-cleanup'] : [])
|
||||
.concat(argv.cleanupDisableBluetooth ? ['--cleanup-disable-bluetooth'] : [])
|
||||
.concat(argv.cleanupBluetoothBonds ? ['--cleanup-bluetooth-bonds'] : [])
|
||||
.concat(!argv.screenReset ? ['--no-screen-reset'] : [])
|
||||
|
||||
return fork(cli, args)
|
||||
|
||||
Reference in New Issue
Block a user