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

Emit progress events on APK installation.

This commit is contained in:
Simo Kinnunen 2014-03-26 13:50:10 +09:00
parent 60cc74c3db
commit a4a1cd89f0

View file

@ -18,9 +18,25 @@ module.exports = syrup.serial()
log.info('Installing "%s"', message.url)
var source = new stream.Readable().wrap(request(message.url))
var seq = 0
push.send([
channel
, wireutil.envelope(new wire.TransactionProgressMessage(
options.serial
, seq++
, 'installing'
))
])
adb.install(options.serial, source)
.then(function() {
if (message.launchActivity) {
push.send([
channel
, wireutil.envelope(new wire.TransactionProgressMessage(
options.serial
, seq++
, 'launching activity'
))
])
log.info(
'Launching activity with action "%s" on component "%s"'
, message.launchActivity.action