mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Fix adb invocations (#202)
This commit is contained in:
@@ -3,6 +3,7 @@ var syrup = require('@devicefarmer/stf-syrup')
|
||||
var logger = require('../../../util/logger')
|
||||
var wire = require('../../../wire')
|
||||
var wireutil = require('../../../wire/util')
|
||||
var DeviceClient = require('@devicefarmer/adbkit/dist/src/adb/DeviceClient').default
|
||||
|
||||
module.exports = syrup.serial()
|
||||
.dependency(require('../support/adb'))
|
||||
@@ -10,13 +11,14 @@ module.exports = syrup.serial()
|
||||
.dependency(require('../support/push'))
|
||||
.define(function(options, adb, router, push) {
|
||||
var log = logger.createLogger('device:plugins:reboot')
|
||||
var deviceClient = new DeviceClient(adb, options.serial)
|
||||
|
||||
router.on(wire.RebootMessage, function(channel) {
|
||||
var reply = wireutil.reply(options.serial)
|
||||
|
||||
log.important('Rebooting')
|
||||
|
||||
adb.reboot(options.serial)
|
||||
deviceClient.reboot()
|
||||
.timeout(30000)
|
||||
.then(function() {
|
||||
push.send([
|
||||
|
||||
Reference in New Issue
Block a user