mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +02:00
Suggest enabling third party apps if STF apk installation is taking a bit too long.
This commit is contained in:
parent
0dda2d9f6f
commit
1cc88e4f42
1 changed files with 13 additions and 2 deletions
|
@ -6,6 +6,7 @@ var semver = require('semver')
|
|||
|
||||
var pathutil = require('../../../util/pathutil')
|
||||
var streamutil = require('../../../util/streamutil')
|
||||
var promiseutil = require('../../../util/promiseutil')
|
||||
var logger = require('../../../util/logger')
|
||||
|
||||
module.exports = syrup.serial()
|
||||
|
@ -71,8 +72,18 @@ module.exports = syrup.serial()
|
|||
})
|
||||
.catch(function() {
|
||||
log.info('Installing STFService')
|
||||
return adb.install(options.serial, resource.apk)
|
||||
.timeout(30000)
|
||||
return promiseutil.periodicNotify(
|
||||
adb.install(options.serial, resource.apk)
|
||||
, 10000
|
||||
)
|
||||
.progressed(function() {
|
||||
log.warn(
|
||||
'STFService installation is taking a long time; '
|
||||
+ 'perhaps you have to accept 3rd party app installation '
|
||||
+ 'on the device?'
|
||||
)
|
||||
})
|
||||
.timeout(60000)
|
||||
.then(function() {
|
||||
return getPath()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue