OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 import copy | 6 import copy |
7 import default_flavor | 7 import default_flavor |
8 | 8 |
9 | 9 |
10 """iOS flavor utils, used for building for and running tests on iOS.""" | 10 """iOS flavor utils, used for building for and running tests on iOS.""" |
11 | 11 |
12 | 12 |
13 class iOSFlavorUtils(default_flavor.DefaultFlavorUtils): | 13 class iOSFlavorUtils(default_flavor.DefaultFlavorUtils): |
14 def __init__(self, skia_api): | 14 def __init__(self, skia_api): |
15 super(iOSFlavorUtils, self).__init__(skia_api) | 15 super(iOSFlavorUtils, self).__init__(skia_api) |
16 self.default_env = {} | 16 self.default_env = {} |
17 if self._skia_api.running_in_swarming: | 17 if self._skia_api.running_in_swarming: |
18 self.default_env['XCODEBUILD'] = ( | 18 self.default_env['XCODEBUILD'] = ( |
19 self._skia_api.slave_dir.join('xcodebuild')) | 19 self._skia_api.slave_dir.join('xcodebuild')) |
20 self.ios_bin = self._skia_api.m.infra_paths['slave_build'].join( | 20 self.ios_bin = self._skia_api.m.path['slave_build'].join( |
21 'skia', 'platform_tools', 'ios', 'bin') | 21 'skia', 'platform_tools', 'ios', 'bin') |
22 | 22 |
23 def step(self, name, cmd, **kwargs): | 23 def step(self, name, cmd, **kwargs): |
24 args = [self.ios_bin.join('ios_run_skia')] | 24 args = [self.ios_bin.join('ios_run_skia')] |
25 env = {} | 25 env = {} |
26 env.update(kwargs.pop('env', {})) | 26 env.update(kwargs.pop('env', {})) |
27 env.update(self.default_env) | 27 env.update(self.default_env) |
28 # Convert 'dm' and 'nanobench' from positional arguments | 28 # Convert 'dm' and 'nanobench' from positional arguments |
29 # to flags, which is what iOSShell expects to select which | 29 # to flags, which is what iOSShell expects to select which |
30 # one is being run. | 30 # one is being run. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 def get_device_dirs(self): | 161 def get_device_dirs(self): |
162 """ Set the directories which will be used by the build steps.""" | 162 """ Set the directories which will be used by the build steps.""" |
163 prefix = self.device_path_join('skiabot', 'skia_') | 163 prefix = self.device_path_join('skiabot', 'skia_') |
164 return default_flavor.DeviceDirs( | 164 return default_flavor.DeviceDirs( |
165 dm_dir=prefix + 'dm', | 165 dm_dir=prefix + 'dm', |
166 perf_data_dir=prefix + 'perf', | 166 perf_data_dir=prefix + 'perf', |
167 resource_dir=prefix + 'resources', | 167 resource_dir=prefix + 'resources', |
168 images_dir=prefix + 'images', | 168 images_dir=prefix + 'images', |
169 skp_dir=prefix + 'skp/skps', | 169 skp_dir=prefix + 'skp/skps', |
170 tmp_dir=prefix + 'tmp_dir') | 170 tmp_dir=prefix + 'tmp_dir') |
OLD | NEW |