mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:23:28 +02:00
Make screenshots work again.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user