mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Make screenshots work again.
This commit is contained in:
parent
f90d1f4a4a
commit
2391d249e0
1 changed files with 7 additions and 7 deletions
|
@ -7,7 +7,6 @@ var logger = require('../../../../util/logger')
|
|||
var wire = require('../../../../wire')
|
||||
var wireutil = require('../../../../wire/util')
|
||||
|
||||
/*jshint maxlen:90*/
|
||||
module.exports = syrup.serial()
|
||||
.dependency(require('../../support/adb'))
|
||||
.dependency(require('../../support/router'))
|
||||
|
@ -22,11 +21,11 @@ module.exports = syrup.serial()
|
|||
function projectionFormat() {
|
||||
return util.format(
|
||||
'%dx%d@%dx%d/%d'
|
||||
, display.width
|
||||
, display.height
|
||||
, display.width
|
||||
, display.height
|
||||
, display.rotation
|
||||
, display.properties.width
|
||||
, display.properties.height
|
||||
, display.properties.width
|
||||
, display.properties.height
|
||||
, display.properties.rotation
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -34,7 +33,8 @@ module.exports = syrup.serial()
|
|||
log.info('Capturing screenshot')
|
||||
|
||||
var file = util.format('/data/local/tmp/minicap_%d.jpg', Date.now())
|
||||
return minicap.run(util.format('-P %s -s >%s', projectionFormat(), file))
|
||||
return minicap.run(util.format(
|
||||
'-P %s -s >%s', projectionFormat(), file))
|
||||
.then(adbkit.util.readAll)
|
||||
.then(function() {
|
||||
return adb.stat(options.serial, file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue