mirror of
https://github.com/openstf/stf
synced 2025-10-05 19:42:01 +02:00
Reorder switches.
This commit is contained in:
parent
50a9de1875
commit
f056e0d2ca
1 changed files with 9 additions and 9 deletions
|
@ -47,6 +47,15 @@ module.exports = function(options) {
|
|||
var wrapper = wire.Envelope.decode(data)
|
||||
channels.keepalive(channel)
|
||||
switch (wrapper.type) {
|
||||
case wire.MessageType.PROBE:
|
||||
var message = wire.ProbeMessage.decode(wrapper.message)
|
||||
adb.getPropertiesAsync(options.serial)
|
||||
.then(function(properties) {
|
||||
identity = devutil.makeIdentity(options.serial, properties)
|
||||
push.send([channel,
|
||||
wireutil.makeDeviceIdentityMessage(options.serial, identity)])
|
||||
})
|
||||
break
|
||||
case wire.MessageType.GROUP:
|
||||
var message = wire.GroupMessage.decode(wrapper.message)
|
||||
, groupChannel = message.channel
|
||||
|
@ -58,15 +67,6 @@ module.exports = function(options) {
|
|||
wireutil.makeJoinGroupMessage(options.serial)])
|
||||
}
|
||||
break
|
||||
case wire.MessageType.PROBE:
|
||||
var message = wire.ProbeMessage.decode(wrapper.message)
|
||||
adb.getPropertiesAsync(options.serial)
|
||||
.then(function(properties) {
|
||||
identity = devutil.makeIdentity(options.serial, properties)
|
||||
push.send([channel,
|
||||
wireutil.makeDeviceIdentityMessage(options.serial, identity)])
|
||||
})
|
||||
break
|
||||
case wire.MessageType.SHELL_COMMAND:
|
||||
var message = wire.ShellCommandMessage.decode(wrapper.message)
|
||||
log.info('Running shell command "%s"', message.command.join(' '))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue