Fix chromecast perfs

Bug: skia:
NOTRY=true
Change-Id: I5efe4bc59efa4bc81e5f8811fed7867ec20447fb
Reviewed-on: https://skia-review.googlesource.com/41541
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Kevin Lubick 2017-08-31 13:32:44 -04:00 committed by Skia Commit-Bot
parent 56ffafee44
commit 5d303ed44b
5 changed files with 31 additions and 16 deletions

View File

@ -221,6 +221,7 @@
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "Delete old nanobench"
},
{
@ -814,11 +815,13 @@
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "Delete executables"
},
{
"cmd": [
"adb"
"adb",
"disconnect"
],
"cwd": "[START_DIR]/skia",
"env": {
@ -881,7 +884,8 @@
},
{
"cmd": [
"adb"
"adb",
"disconnect"
],
"cwd": "[START_DIR]/skia",
"env": {

View File

@ -101,7 +101,8 @@ class GNChromecastFlavorUtils(gn_android_flavor.GNAndroidFlavorUtils):
# TODO(kjlubick): Remove this after we are backfilled up and don't need
# to manually delete this
self._ssh('Delete old nanobench', 'rm', '/cache/skia/nanobench',
abort_on_failure=False)
abort_on_failure=False, fail_build_on_failure=False,
infra_step=True)
def _adb(self, title, *cmd, **kwargs):
if not self._ever_ran_adb:
@ -152,9 +153,9 @@ class GNChromecastFlavorUtils(gn_android_flavor.GNAndroidFlavorUtils):
if self._ever_ran_adb:
# To clean up disk space for next time
self._ssh('Delete executables', 'rm', '-r', self.m.vars.android_bin_dir,
abort_on_failure=False)
abort_on_failure=False, infra_step=True)
# Reconnect if was disconnected
self._adb('disconnect')
self._adb('disconnect', 'disconnect')
self._connect_to_remote()
self.m.run(self.m.python.inline, 'dump log', program="""
import os
@ -176,16 +177,14 @@ class GNChromecastFlavorUtils(gn_android_flavor.GNAndroidFlavorUtils):
infra_step=True,
abort_on_failure=False)
self._adb('disconnect')
self._adb('disconnect', 'disconnect')
self._adb('kill adb server', 'kill-server')
def _ssh(self, title, *cmd, **kwargs):
ssh_cmd = ['ssh', '-oConnectTimeout=15', '-oBatchMode=yes',
'-t', '-t', 'root@%s' % self.user_ip] + list(cmd)
return self.m.run(self.m.step, title, cmd=ssh_cmd,
infra_step=False, **kwargs)
return self.m.run(self.m.step, title, cmd=ssh_cmd, **kwargs)
def step(self, name, cmd, **kwargs):
app = self.m.vars.skia_out.join(self.m.vars.configuration, cmd[0])
@ -194,5 +193,5 @@ class GNChromecastFlavorUtils(gn_android_flavor.GNAndroidFlavorUtils):
'push', app, self.m.vars.android_bin_dir)
cmd[0] = '%s/%s' % (self.m.vars.android_bin_dir, cmd[0])
self._ssh(str(name), *cmd)
self._ssh(str(name), *cmd, infra_step=False)

View File

@ -91,6 +91,7 @@
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "Delete old nanobench"
},
{
@ -383,11 +384,13 @@
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "Delete executables"
},
{
"cmd": [
"adb"
"adb",
"disconnect"
],
"cwd": "[START_DIR]/skia",
"env": {
@ -450,7 +453,8 @@
},
{
"cmd": [
"adb"
"adb",
"disconnect"
],
"cwd": "[START_DIR]/skia",
"env": {

View File

@ -91,6 +91,7 @@
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "Delete old nanobench"
},
{
@ -473,11 +474,13 @@
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "Delete executables"
},
{
"cmd": [
"adb"
"adb",
"disconnect"
],
"cwd": "[START_DIR]/skia",
"env": {
@ -540,7 +543,8 @@
},
{
"cmd": [
"adb"
"adb",
"disconnect"
],
"cwd": "[START_DIR]/skia",
"env": {

View File

@ -91,6 +91,7 @@
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "Delete old nanobench"
},
{
@ -657,11 +658,13 @@
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "Delete executables"
},
{
"cmd": [
"adb"
"adb",
"disconnect"
],
"cwd": "[START_DIR]/skia",
"env": {
@ -724,7 +727,8 @@
},
{
"cmd": [
"adb"
"adb",
"disconnect"
],
"cwd": "[START_DIR]/skia",
"env": {