mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 04:53:28 +02:00
Remove remote files before installing, it seems to work more reliably (less "text busy").
This commit is contained in:
@@ -34,6 +34,14 @@ module.exports = syrup()
|
||||
}
|
||||
}
|
||||
|
||||
function removeResource(res) {
|
||||
return adb.shell(options.serial, ['rm', res.dest])
|
||||
.then(function(out) {
|
||||
return streamutil.readAll(out)
|
||||
})
|
||||
.return(res)
|
||||
}
|
||||
|
||||
function installResource(res) {
|
||||
return adb.push(options.serial, res.src, res.dest, res.mode)
|
||||
.then(function(transfer) {
|
||||
@@ -65,8 +73,8 @@ module.exports = syrup()
|
||||
|
||||
function installAll() {
|
||||
return Promise.all([
|
||||
installResource(resources.bin).then(ensureNotBusy)
|
||||
, installResource(resources.lib)
|
||||
removeResource(resources.bin).then(installResource).then(ensureNotBusy)
|
||||
, removeResource(resources.lib).then(installResource)
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user