diff options
author | Stephan Altmueller <stephana@google.com> | 2017-04-25 11:38:38 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-25 16:56:41 +0000 |
commit | 63e843d891f665b9c537eac5a9c78e110c929c80 (patch) | |
tree | 43c27dd28dd86ec04be4aa8360aefad061f4d7fa /infra/bots/recipe_modules/flavor/ios_flavor.py | |
parent | 25d82961ffae0bd274c0ea44070d01e906c11215 (diff) |
Enable ios on Raspberry Pi
Adds more jobs to iOS testing and switches to
RPi based hosts.
Bug: skia:
Change-Id: I0124c6554173fa3b22b077a198612bb30691d1fb
Reviewed-on: https://skia-review.googlesource.com/11521
Commit-Queue: Stephan Altmueller <stephana@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/flavor/ios_flavor.py')
-rw-r--r-- | infra/bots/recipe_modules/flavor/ios_flavor.py | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/infra/bots/recipe_modules/flavor/ios_flavor.py b/infra/bots/recipe_modules/flavor/ios_flavor.py index 976e840f93..cc6143ac41 100644 --- a/infra/bots/recipe_modules/flavor/ios_flavor.py +++ b/infra/bots/recipe_modules/flavor/ios_flavor.py @@ -9,12 +9,21 @@ import default_flavor import gn_flavor import os -# Infra step failures interact really annoyingly with swarming retries. -kInfraStep = False - class iOSFlavorUtils(gn_flavor.GNFlavorUtils): def install(self): + # Set up the device + self.m.run(self.m.step, 'setup_device', cmd=['ios.py'], infra_step=True) + + # Install the app. + for app_name in ['dm', 'nanobench']: + app_package = self.m.vars.skia_out.join(self.m.vars.configuration, + '%s.app' % app_name) + self.m.run(self.m.step, + 'install_' + app_name, + cmd=['ideviceinstaller', '-i', app_package], + infra_step=True) + self.device_dirs = default_flavor.DeviceDirs( dm_dir='dm', perf_data_dir='perf', @@ -33,21 +42,20 @@ class iOSFlavorUtils(gn_flavor.GNFlavorUtils): for app in ['dm', 'nanobench']: self._py('package ' + app, self.m.vars.skia_dir.join('gn', 'package_ios.py'), - args=[self.out_dir.join(app)]) + args=[self.out_dir.join(app)], infra_step=True) def step(self, name, cmd, env=None, **kwargs): - app = self.m.vars.skia_out.join(self.m.vars.configuration, cmd[0]) - - self._run(name, - ['ios-deploy', '-b', '%s.app' % app, - '-I', '--args', ' '.join(map(str, cmd[1:]))]) + bundle_id = 'com.google.%s' % cmd[0] + self.m.run(self.m.step, name, + cmd=['idevice-app-runner', '-s', bundle_id, '--args'] + + map(str, cmd[1:])) def _run_ios_script(self, script, first, *rest): full = self.m.vars.skia_dir.join('platform_tools/ios/bin/ios_' + script) self.m.run(self.m.step, name = '%s %s' % (script, first), cmd = [full, first] + list(rest), - infra_step=kInfraStep) + infra_step=True) def copy_file_to_device(self, host, device): self._run_ios_script('push_file', host, device) @@ -71,6 +79,6 @@ class iOSFlavorUtils(gn_flavor.GNFlavorUtils): name = 'cat_file %s' % path, cmd = [full, path], stdout=self.m.raw_io.output(), - infra_step=kInfraStep, + infra_step=True, **kwargs) return rv.stdout.rstrip() if rv and rv.stdout else None |