mirror of
https://github.com/openstf/stf
synced 2025-10-06 12:00:08 +02:00
Support uninstalling applications.
This commit is contained in:
parent
8584daaa71
commit
655af52659
4 changed files with 53 additions and 0 deletions
|
@ -132,4 +132,35 @@ module.exports = syrup.serial()
|
|||
])
|
||||
})
|
||||
})
|
||||
|
||||
router.on(wire.UninstallMessage, function(channel, message) {
|
||||
log.info('Uninstalling "%s"', message.package)
|
||||
|
||||
var seq = 0
|
||||
|
||||
adb.uninstall(options.serial, message.package)
|
||||
.then(function() {
|
||||
push.send([
|
||||
channel
|
||||
, wireutil.envelope(new wire.TransactionDoneMessage(
|
||||
options.serial
|
||||
, seq++
|
||||
, true
|
||||
, 'success'
|
||||
))
|
||||
])
|
||||
})
|
||||
.catch(function(err) {
|
||||
log.error('Uninstallation failed', err.stack)
|
||||
push.send([
|
||||
channel
|
||||
, wireutil.envelope(new wire.TransactionDoneMessage(
|
||||
options.serial
|
||||
, seq++
|
||||
, false
|
||||
, 'fail'
|
||||
))
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue