mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 06:53:20 +02:00
* Upgrading STF for security reasons Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * update semaphore files Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * upgrading STF for security reasons v2 Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * update yarn.lock file Signed-off-by: Denis barbaron <denis.barbaron@orange.com> --------- Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
28 lines
814 B
JavaScript
28 lines
814 B
JavaScript
/**
|
|
* Copyright © 2019-2024 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
|
**/
|
|
|
|
var syrup = require('@devicefarmer/stf-syrup')
|
|
var logger = require('../../../util/logger')
|
|
var promiseutil = require('../../../util/promiseutil')
|
|
|
|
module.exports = syrup.serial()
|
|
.define(function(options) {
|
|
var log = logger.createLogger('device:support:adb')
|
|
var adb = require('../../../util/adbutil')(options)
|
|
|
|
function ensureBootComplete() {
|
|
return promiseutil.periodicNotify(
|
|
adb.waitBootComplete(options.serial)
|
|
, 1000
|
|
)
|
|
.progressed(function() {
|
|
log.info('Waiting for boot to complete')
|
|
})
|
|
.timeout(options.bootCompleteTimeout)
|
|
}
|
|
|
|
return ensureBootComplete()
|
|
.return(adb)
|
|
})
|