option to cleanup tmp folder during cleanup phase (#772)

* option to cleanup tmp folder during cleanup phase

Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com>

* do only one adb command at time to ensure them all are executed

Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com>

* cleanup and fix lint errors

Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com>

---------

Signed-off-by: Jussi Vatjus-Anttila <jussiva@gmail.com>
This commit is contained in:
Jussi Vatjus-Anttila
2024-08-16 14:21:24 +03:00
committed by GitHub
parent 870d837a9d
commit 8aae1616ac
4 changed files with 114 additions and 5 deletions

View File

@@ -39,6 +39,12 @@ module.exports.builder = function(yargs) {
, type: 'boolean'
, default: false
})
.option('cleanup-folder', {
describe: 'Whether to remove pre-defined folder during cleanup. ' +
'eg. "--cleanup-folder /data/local /tmp"'
, type: 'array'
, default: []
})
.option('connect-port', {
describe: 'Port allocated to adb connections.'
, type: 'number'
@@ -201,6 +207,7 @@ module.exports.handler = function(argv) {
, cleanup: argv.cleanup
, cleanupDisableBluetooth: argv.cleanupDisableBluetooth
, cleanupBluetoothBonds: argv.cleanupBluetoothBonds
, cleanupFolder: argv.cleanupFolder
, screenReset: argv.screenReset
})
}

View File

@@ -119,6 +119,12 @@ module.exports.builder = function(yargs) {
, type: 'boolean'
, default: false
})
.option('cleanup-folder', {
describe: 'Whether to remove pre-defined folder during cleanup. ' +
'eg. "--cleanup-folder /data/local /tmp"'
, type: 'array'
, default: []
})
.option('group-timeout', {
alias: 't'
, describe: 'Timeout in seconds for automatic release of inactive devices.'
@@ -318,6 +324,7 @@ module.exports.handler = function(argv) {
.concat(!argv.cleanup ? ['--no-cleanup'] : [])
.concat(argv.cleanupDisableBluetooth ? ['--cleanup-disable-bluetooth'] : [])
.concat(argv.cleanupBluetoothBonds ? ['--cleanup-bluetooth-bonds'] : [])
.concat(argv.cleanupFolder ? ['--cleanup-folder'].concat(argv.cleanupFolder) : [])
.concat(!argv.screenReset ? ['--no-screen-reset'] : [])
.concat(argv.serial))

View File

@@ -53,6 +53,12 @@ module.exports.builder = function(yargs) {
, type: 'boolean'
, default: false
})
.option('cleanup-folder', {
describe: 'Whether to remove pre-defined folder during cleanup. ' +
'eg. "--cleanup-folder /data/local /tmp"'
, type: 'array'
, default: []
})
.option('connect-push', {
alias: 'p'
, describe: 'Device-side ZeroMQ PULL endpoint to connect to.'
@@ -235,6 +241,7 @@ module.exports.handler = function(argv) {
.concat(!argv.cleanup ? ['--no-cleanup'] : [])
.concat(argv.cleanupDisableBluetooth ? ['--cleanup-disable-bluetooth'] : [])
.concat(argv.cleanupBluetoothBonds ? ['--cleanup-bluetooth-bonds'] : [])
.concat(argv.cleanupFolder ? ['--cleanup-folder'].concat(argv.cleanupFolder) : [])
.concat(!argv.screenReset ? ['--no-screen-reset'] : [])
return fork(cli, args)