Files
stf-DeviceFarmer/lib/units/device/support/adb.js
Denis Barbaron 2f54e40206 Upgrading STF for security reasons (#813)
* 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>
2024-11-22 11:41:20 +01:00

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)
})