Fix monkey command to not break due to auto-escaping.

This commit is contained in:
Simo Kinnunen
2014-01-30 14:26:06 +09:00
parent 4b934f5c66
commit 3e3b98891f

View File

@@ -158,13 +158,12 @@ module.exports = function(options) {
return devutil.ensureUnusedPort(adb, options.serial, 1080)
.then(function(port) {
var log = logger.createLogger('device:remote:monkey')
return adb.shellAsync(options.serial, [
return adb.shellAsync(options.serial, util.format(
// Some devices fail without an SD card installed; we can
// fake an external storage using this method
'EXTERNAL_STORAGE=/data/local/tmp'
, 'monkey'
, '--port', port
])
'EXTERNAL_STORAGE=/data/local/tmp monkey --port %d'
, port
))
.then(function(out) {
vitals.register('device:remote:monkey:shell', out)
out.pipe(require('split')())