OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 android_devices | 6 import android_devices |
7 import copy | 7 import copy |
8 import default_flavor | 8 import default_flavor |
9 | 9 |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 return self._android_flavor._skia_api.run(self._adb, *args, **kwargs) | 58 return self._android_flavor._skia_api.run(self._adb, *args, **kwargs) |
59 | 59 |
60 | 60 |
61 class AndroidFlavorUtils(default_flavor.DefaultFlavorUtils): | 61 class AndroidFlavorUtils(default_flavor.DefaultFlavorUtils): |
62 def __init__(self, skia_api): | 62 def __init__(self, skia_api): |
63 super(AndroidFlavorUtils, self).__init__(skia_api) | 63 super(AndroidFlavorUtils, self).__init__(skia_api) |
64 self.device = self._skia_api.builder_spec['device_cfg'] | 64 self.device = self._skia_api.builder_spec['device_cfg'] |
65 slave_info = android_devices.SLAVE_INFO.get( | 65 slave_info = android_devices.SLAVE_INFO.get( |
66 self._skia_api.slave_name, | 66 self._skia_api.slave_name, |
67 android_devices.SLAVE_INFO['default']) | 67 android_devices.SLAVE_INFO['default']) |
68 self.android_bin = self._skia_api.m.infra_paths['slave_build'].join( | 68 self.android_bin = self._skia_api.m.path['slave_build'].join( |
69 'skia', 'platform_tools', 'android', 'bin') | 69 'skia', 'platform_tools', 'android', 'bin') |
70 self._android_sdk_root = slave_info.android_sdk_root | 70 self._android_sdk_root = slave_info.android_sdk_root |
71 self.serial = slave_info.serial | 71 self.serial = slave_info.serial |
72 self.serial_args = ['-s', slave_info.serial] | 72 self.serial_args = ['-s', slave_info.serial] |
73 if self._skia_api.running_in_swarming: | 73 if self._skia_api.running_in_swarming: |
74 self._android_sdk_root = android_devices.SWARMING_SDK_ROOT | 74 self._android_sdk_root = android_devices.SWARMING_SDK_ROOT |
75 self.serial = None | 75 self.serial = None |
76 self.serial_args = [] | 76 self.serial_args = [] |
77 self._adb = _ADBWrapper( | 77 self._adb = _ADBWrapper( |
78 self._skia_api.m.adb, | 78 self._skia_api.m.adb, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 ).stdout.rstrip() | 269 ).stdout.rstrip() |
270 prefix = self.device_path_join(device_scratch_dir, 'skiabot', 'skia_') | 270 prefix = self.device_path_join(device_scratch_dir, 'skiabot', 'skia_') |
271 return default_flavor.DeviceDirs( | 271 return default_flavor.DeviceDirs( |
272 dm_dir=prefix + 'dm', | 272 dm_dir=prefix + 'dm', |
273 perf_data_dir=prefix + 'perf', | 273 perf_data_dir=prefix + 'perf', |
274 resource_dir=prefix + 'resources', | 274 resource_dir=prefix + 'resources', |
275 images_dir=prefix + 'images', | 275 images_dir=prefix + 'images', |
276 skp_dir=prefix + 'skp/skps', | 276 skp_dir=prefix + 'skp/skps', |
277 tmp_dir=prefix + 'tmp_dir') | 277 tmp_dir=prefix + 'tmp_dir') |
278 | 278 |
OLD | NEW |