From 72a16ed2ff559d1ea895c0213fa805c140b5948a Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Tue, 20 Dec 2016 22:48:55 +0900 Subject: [PATCH] Make boot complete timeout configurable. --- lib/cli.js | 10 ++++++++++ lib/units/device/support/adb.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/cli.js b/lib/cli.js index a5578b20..69d53ccd 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -50,6 +50,10 @@ program , 'heartbeat interval' , Number , 10000) + .option('--boot-complete-timeout ' + , 'how long to wait for boot to complete during device setup' + , Number + , 60000) .option('--adb-host ' , 'ADB host (defaults to 127.0.0.1)' , String @@ -120,6 +124,7 @@ program , '--screen-jpeg-quality', options.screenJpegQuality , '--connect-url-pattern', options.connectUrlPattern , '--heartbeat-interval', options.heartbeatInterval + , '--boot-complete-timeout', options.bootCompleteTimeout , '--vnc-initial-size', options.vncInitialSize.join('x') ] .concat(options.muteMaster ? ['--mute-master'] : []) @@ -195,6 +200,10 @@ program , 'heartbeat interval' , Number , 10000) + .option('--boot-complete-timeout ' + , 'how long to wait for boot to complete during device setup' + , Number + , 60000) .option('--mute-master' , 'whether to mute master volume when devices are being used') .option('--lock-rotation' @@ -244,6 +253,7 @@ program , vncPort: options.vncPort , vncInitialSize: options.vncInitialSize , heartbeatInterval: options.heartbeatInterval + , bootCompleteTimeout: options.bootCompleteTimeout , muteMaster: options.muteMaster , lockRotation: options.lockRotation , cleanup: options.cleanup diff --git a/lib/units/device/support/adb.js b/lib/units/device/support/adb.js index 85de547c..ff67b914 100644 --- a/lib/units/device/support/adb.js +++ b/lib/units/device/support/adb.js @@ -22,7 +22,7 @@ module.exports = syrup.serial() .progressed(function() { log.info('Waiting for boot to complete') }) - .timeout(60000) + .timeout(options.bootCompleteTimeout) } return ensureBootComplete()