mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
Switch install plugin to send status codes instead of full strings.
This commit is contained in:
@@ -57,7 +57,7 @@ module.exports = syrup.serial()
|
||||
if (contentLength) {
|
||||
// Progress 0% to 70%
|
||||
sendProgress(
|
||||
'Pushing app to the device'
|
||||
'pushing_file'
|
||||
, 70 * Math.max(0, Math.min(
|
||||
70
|
||||
, stats.bytesTransferred / contentLength
|
||||
@@ -87,11 +87,11 @@ module.exports = syrup.serial()
|
||||
}
|
||||
|
||||
// Progress 0%
|
||||
sendProgress('Pushing app to the device', 0)
|
||||
sendProgress('pushing_file', 0)
|
||||
pushApp()
|
||||
.then(function(apk) {
|
||||
// Progress 80%
|
||||
sendProgress('Installing app', 80)
|
||||
sendProgress('installing_app', 80)
|
||||
return adb.installRemote(options.serial, apk)
|
||||
})
|
||||
.timeout(10000)
|
||||
@@ -103,7 +103,7 @@ module.exports = syrup.serial()
|
||||
, message.launchActivity.component
|
||||
)
|
||||
// Progress 90%
|
||||
sendProgress('Launching activity', 90)
|
||||
sendProgress('launching_app', 90)
|
||||
return adb.startActivity(options.serial, message.launchActivity)
|
||||
}
|
||||
})
|
||||
@@ -115,7 +115,7 @@ module.exports = syrup.serial()
|
||||
options.serial
|
||||
, seq++
|
||||
, true
|
||||
, 'Installation complete'
|
||||
, 'success'
|
||||
))
|
||||
])
|
||||
})
|
||||
@@ -127,7 +127,7 @@ module.exports = syrup.serial()
|
||||
options.serial
|
||||
, seq++
|
||||
, false
|
||||
, 'Installation failed'
|
||||
, 'fail'
|
||||
))
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user