mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
Save device logs to rethinkdb.
This commit is contained in:
parent
39989c6e7a
commit
389db73f08
8 changed files with 140 additions and 41 deletions
|
@ -35,12 +35,25 @@ module.exports = function(options) {
|
|||
// Show serial number in logs
|
||||
logger.setGlobalIdentifier(options.serial)
|
||||
|
||||
// Output
|
||||
var push = zmq.socket('push')
|
||||
options.endpoints.push.forEach(function(endpoint) {
|
||||
log.info('Sending output to %s', endpoint)
|
||||
push.connect(endpoint)
|
||||
})
|
||||
|
||||
// Panic if necessary
|
||||
Promise.onPossiblyUnhandledRejection(function(err, promise) {
|
||||
log.fatal('Unhandled rejection', err.stack)
|
||||
selfDestruct()
|
||||
})
|
||||
|
||||
// Forward all logs
|
||||
logger.on('entry', function(entry) {
|
||||
push.send([wireutil.global,
|
||||
wireutil.makeDeviceLogMessage(options.serial, entry)])
|
||||
})
|
||||
|
||||
// Adb
|
||||
var adb = Promise.promisifyAll(adbkit.createClient())
|
||||
|
||||
|
@ -299,13 +312,6 @@ module.exports = function(options) {
|
|||
}
|
||||
})
|
||||
|
||||
// Output
|
||||
var push = zmq.socket('push')
|
||||
options.endpoints.push.forEach(function(endpoint) {
|
||||
log.info('Sending output to %s', endpoint)
|
||||
push.connect(endpoint)
|
||||
})
|
||||
|
||||
function poke() {
|
||||
push.send([wireutil.global,
|
||||
wireutil.makeDevicePokeMessage(options.serial, solo)])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue