aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2018-01-16 16:15:57 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-16 21:35:48 +0000
commit608c35ae108c7bdc2cd71612ad8aa58b24c10b16 (patch)
treeaea37381daef78d739177be91d9802fae6fd0a97 /infra/bots/recipe_modules
parent8ee7fb0083c0b00e494f580cba216ab71a889e22 (diff)
Fix Test-Chromecast from running out of memory on tests
Bug: skia:7166 Change-Id: Iefc8c6c1b72805dfe3ec8bd06d6ba6a878307582 Reviewed-on: https://skia-review.googlesource.com/93620 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'infra/bots/recipe_modules')
-rw-r--r--infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All.json20
-rw-r--r--infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py19
2 files changed, 14 insertions, 25 deletions
diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All.json
index fa51d74d82..f141a1bf2d 100644
--- a/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All.json
+++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All.json
@@ -208,26 +208,6 @@
},
{
"cmd": [
- "ssh",
- "-oConnectTimeout=15",
- "-oBatchMode=yes",
- "-t",
- "-t",
- "root@192.168.1.2",
- "rm",
- "/cache/skia/nanobench"
- ],
- "env": {
- "BUILDTYPE": "Release",
- "CHROME_HEADLESS": "1",
- "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
- "SKIA_OUT": "[START_DIR]/out"
- },
- "infra_step": true,
- "name": "Delete old nanobench"
- },
- {
- "cmd": [
"python",
"-u",
"\nimport os\nimport subprocess\nimport sys\nhost = sys.argv[1]\ndevice = sys.argv[2]\nfor d, _, fs in os.walk(host):\n p = os.path.relpath(d, host)\n if p != '.' and p.startswith('.'):\n continue\n for f in fs:\n print os.path.join(p,f)\n hp = os.path.realpath(os.path.join(host, p, f))\n if os.stat(hp).st_size > (1.5 * 1024 * 1024):\n print \"Skipping because it is too big\"\n else:\n subprocess.check_call(['adb', 'push',\n hp, os.path.join(device, p, f)])\n",
diff --git a/infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py b/infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py
index 771bc8e45b..11ee674ab2 100644
--- a/infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_chromecast_flavor.py
@@ -18,6 +18,20 @@ class GNChromecastFlavorUtils(gn_android_flavor.GNAndroidFlavorUtils):
self.m.vars.android_bin_dir = self.m.path.join(self.m.vars.android_bin_dir,
'bin')
+ # Disk space is extremely tight on the Chromecasts (~100M) There is not
+ # enough space on the android_data_dir (/cache/skia) to fit the images,
+ # resources, executable and output the dm images. So, we have dm_out be
+ # on the tempfs (i.e. RAM) /dev/shm. (which is about 140M)
+
+ self.device_dirs = default_flavor.DeviceDirs(
+ dm_dir = '/dev/shm/skia/dm_out',
+ perf_data_dir = self.m.vars.android_data_dir + 'perf',
+ resource_dir = self.m.vars.android_data_dir + 'resources',
+ images_dir = self.m.vars.android_data_dir + 'images',
+ skp_dir = self.m.vars.android_data_dir + 'skps',
+ svg_dir = self.m.vars.android_data_dir + 'svgs',
+ tmp_dir = self.m.vars.android_data_dir)
+
@property
def user_ip_host(self):
if not self._user_ip:
@@ -97,11 +111,6 @@ class GNChromecastFlavorUtils(gn_android_flavor.GNAndroidFlavorUtils):
super(GNChromecastFlavorUtils, self).install()
self._adb('mkdir ' + self.m.vars.android_bin_dir,
'shell', 'mkdir', '-p', self.m.vars.android_bin_dir)
- # 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, fail_build_on_failure=False,
- infra_step=True)
def _adb(self, title, *cmd, **kwargs):
if not self._ever_ran_adb: