1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

Logcat works now, but still kind of wondering how the messages should arrive.

This commit is contained in:
Simo Kinnunen 2014-04-17 18:27:35 +09:00
parent 40b493649b
commit 8da5b61289
7 changed files with 240 additions and 107 deletions

View file

@ -324,6 +324,9 @@ module.exports = function(options) {
.on(wire.TransactionDoneMessage, function(channel, message) {
socket.emit('tx.done', channel.toString(), message)
})
.on(wire.DeviceLogcatEntryMessage, function(channel, message) {
socket.emit('logcat.entry', message)
})
.handler()
// Global messages
@ -530,6 +533,26 @@ module.exports = function(options) {
])
})
})
.on('logcat.start', function(channel, responseChannel, data) {
joinChannel(responseChannel)
push.send([
channel
, wireutil.transaction(
responseChannel
, new wire.LogcatStartMessage(data)
)
])
})
.on('logcat.stop', function(channel, responseChannel) {
joinChannel(responseChannel)
push.send([
channel
, wireutil.transaction(
responseChannel
, new wire.LogcatStopMessage()
)
])
})
})
.finally(function() {
// Clean up all listeners and subscriptions